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

Diff for /pegasus/src/Executor/Child.c between version 1.1.2.4 and 1.2

version 1.1.2.4, 2007/01/11 20:48:24 version 1.2, 2007/05/25 18:35:07
Line 39 
Line 39 
 #include "Defines.h" #include "Defines.h"
 #include "Fatal.h" #include "Fatal.h"
 #include "Path.h" #include "Path.h"
 #include "File.h"  
 #include "Log.h" #include "Log.h"
 #include "User.h" #include "User.h"
  
Line 59 
Line 58 
     const char* path,     const char* path,
     int uid,     int uid,
     int gid,     int gid,
     int sock,      int sock)
     const char* repositoryDir)  
 { {
     char sockStr[EXECUTOR_BUFFER_SIZE];     char sockStr[EXECUTOR_BUFFER_SIZE];
     char username[EXECUTOR_BUFFER_SIZE];     char username[EXECUTOR_BUFFER_SIZE];
     char** execArgv;     char** execArgv;
  
     /* Build argument list, adding "-x <sock>" option if sock non-negative. */      /* Build argument list, adding "--executor-socket <sock>" option if
        * sock non-negative.
        */
  
     execArgv = (char**)malloc(sizeof(char*) * (argc + 3));     execArgv = (char**)malloc(sizeof(char*) * (argc + 3));
     memcpy(execArgv + 3, argv + 1, sizeof(char*) * argc);     memcpy(execArgv + 3, argv + 1, sizeof(char*) * argc);
Line 74 
Line 74 
     sprintf(sockStr, "%d", sock);     sprintf(sockStr, "%d", sock);
  
     execArgv[0] = CIMSERVERMAIN;     execArgv[0] = CIMSERVERMAIN;
     execArgv[1] = "-x";      execArgv[1] = "--executor-socket";
     execArgv[2] = strdup(sockStr);     execArgv[2] = strdup(sockStr);
  
     /* Check whether repository directory exists. */  
   
     if (AccessDir(repositoryDir) != 0)  
         Fatal(FL,  
             "failed to access repository directory: %s", repositoryDir);  
   
     /*  
      * Change ownership of Pegasus repository directory (it should be owned  
      * by same user that owns CIMSERVERMAIN).  
      */  
   
     ChangeDirOwnerRecursive(repositoryDir, uid, gid);  
   
     Log(LL_TRACE, "Pegasus repositoryDir is \"%s\"", repositoryDir);  
   
     /*     /*
      * Downgrade privileges by setting the UID and GID of this process. Use      * Downgrade privileges by setting the UID and GID of this process. Use
      * the owner of the CIMSERVERMAIN program obtained above.      * the owner of the CIMSERVERMAIN program obtained above.


Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2