(file) Return to Executor.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Executor.cpp between version 1.1.4.11 and 1.1.4.12

version 1.1.4.11, 2007/05/23 22:27:36 version 1.1.4.12, 2007/05/24 19:34:56
Line 103 
Line 103 
  
     virtual int startProviderAgent(     virtual int startProviderAgent(
         const char* module,         const char* module,
           const String& pegasusHome,
         const String& userName,         const String& userName,
         int uid,         int uid,
         int gid,         int gid,
Line 194 
Line 195 
  
     virtual int startProviderAgent(     virtual int startProviderAgent(
         const char* module,         const char* module,
           const String& pegasusHome,
         const String& userName,         const String& userName,
         int uid,         int uid,
         int gid,         int gid,
Line 215 
Line 217 
  
         // Create pipes. Export handles to string.         // Create pipes. Export handles to string.
  
         AnonymousPipe* pipeFromAgent = new AnonymousPipe();          AutoPtr<AnonymousPipe> pipeFromAgent(new AnonymousPipe());
         AnonymousPipe* pipeToAgent = new AnonymousPipe();          AutoPtr<AnonymousPipe> pipeToAgent(new AnonymousPipe());
  
         char readHandle[32];         char readHandle[32];
         char writeHandle[32];         char writeHandle[32];
Line 236 
Line 238 
  
         // Build full path of "cimprovagt" program.         // Build full path of "cimprovagt" program.
  
         String path;          String path = FileSystem::getAbsolutePath(
               pegasusHome.getCString(), PEGASUS_PROVIDER_AGENT_PROC_NAME);
         if (_getProviderAgentPath(path) != 0)  
         {  
             delete pipeToAgent;  
             delete pipeFromAgent;  
             return -1;  
         }  
  
         // Format command line.         // Format command line.
  
Line 269 
Line 265 
             &siStartInfo,  //  STARTUPINFO             &siStartInfo,  //  STARTUPINFO
             &piProcInfo))  //  PROCESS_INFORMATION             &piProcInfo))  //  PROCESS_INFORMATION
         {         {
             delete pipeToAgent;  
             delete pipeFromAgent;  
             return -1;             return -1;
         }         }
  
Line 282 
Line 276 
         pipeToAgent->closeReadHandle();         pipeToAgent->closeReadHandle();
         pipeFromAgent->closeWriteHandle();         pipeFromAgent->closeWriteHandle();
  
         readPipe = pipeFromAgent;          readPipe = pipeFromAgent.release();
         writePipe = pipeToAgent;          writePipe = pipeToAgent.release();
  
         return 0;         return 0;
  
Line 311 
Line 305 
         {         {
             // Resolve full path of "cimprovagt".             // Resolve full path of "cimprovagt".
  
             String path;              String path = FileSystem::getAbsolutePath(
                   pegasusHome.getCString(), PEGASUS_PROVIDER_AGENT_PROC_NAME);
             if (_getProviderAgentPath(path) != 0)  
                 return -1;  
  
             // Create "to-agent" pipe:             // Create "to-agent" pipe:
  
Line 378 
Line 370 
                     {                     {
                         PEG_TRACE_STRING(TRC_OS_ABSTRACTION, Tracer::LEVEL2,                         PEG_TRACE_STRING(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
                           String("setgid failed: ") + String(strerror(errno)));                           String("setgid failed: ") + String(strerror(errno)));
                         return false;                          return -1;
                     }                     }
  
                     if (setuid(uid) != 0)                     if (setuid(uid) != 0)
                     {                     {
                         PEG_TRACE_STRING(TRC_OS_ABSTRACTION, Tracer::LEVEL2,                         PEG_TRACE_STRING(TRC_OS_ABSTRACTION, Tracer::LEVEL2,
                           String("setuid failed: ") + String(strerror(errno)));                           String("setuid failed: ") + String(strerror(errno)));
                         return false;                          return -1;
                     }                     }
                 }                 }
  
Line 496 
Line 488 
  
 private: private:
  
     static int _getProviderAgentPath(String& path)  
     {  
         path = PEGASUS_PROVIDER_AGENT_PROC_NAME;  
   
         if (path[0] != '/')  
         {  
             const char* env = getenv("PEGASUS_HOME");  
   
             if (!env)  
                 return -1;  
   
             path = String(env) + String("/") + path;  
         }  
   
         return 0;  
     }  
   
     Mutex _mutex;     Mutex _mutex;
 }; };
  
Line 691 
Line 666 
  
     virtual int startProviderAgent(     virtual int startProviderAgent(
         const char* module,         const char* module,
           const String& pegasusHome,
         const String& userName,         const String& userName,
         int uid,         int uid,
         int gid,         int gid,
Line 1090 
Line 1066 
  
 int Executor::startProviderAgent( int Executor::startProviderAgent(
     const char* module,     const char* module,
       const String& pegasusHome,
     const String& userName,     const String& userName,
     int uid,     int uid,
     int gid,     int gid,
Line 1097 
Line 1074 
     AnonymousPipe*& readPipe,     AnonymousPipe*& readPipe,
     AnonymousPipe*& writePipe)     AnonymousPipe*& writePipe)
 { {
     return _getImpl()->startProviderAgent(module,      return _getImpl()->startProviderAgent(module, pegasusHome,
         userName, uid, gid, pid, readPipe, writePipe);         userName, uid, gid, pid, readPipe, writePipe);
 } }
  


Legend:
Removed from v.1.1.4.11  
changed lines
  Added in v.1.1.4.12

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2