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

Diff for /pegasus/src/Executor/main.c between version 1.1.2.13 and 1.2

version 1.1.2.13, 2007/01/17 18:48:53 version 1.2, 2007/05/25 18:35:07
Line 59 
Line 59 
 ** **
 **     Determine which user to run CIMSERVERMAIN as. **     Determine which user to run CIMSERVERMAIN as.
 ** **
 **     Note: this algorithm is no longer in use.  
 **  
 **============================================================================== **==============================================================================
 */ */
  
Line 71 
Line 69 
     if (GetUserInfo(username, uid, gid) != 0)     if (GetUserInfo(username, uid, gid) != 0)
     {     {
         Fatal(FL,         Fatal(FL,
             "The %s user does not exist: \"%s\". Please create "              "The %s user \"%s\" does not exist.",
             "a system user with that name or use an OpenPegasus build that "              CIMSERVERMAIN, username);
             "disables privilege separation.", CIMSERVERMAIN, username);  
     }     }
  
     return -1;      return 0;
 } }
  
 /* /*
Line 268 
Line 265 
         DefineMacro("currentConfigFilePath", path);         DefineMacro("currentConfigFilePath", path);
     }     }
  
     /* Define ${repositoryDir} */      /* Define ${plannedConfigFilePath} */
       {
           char path[EXECUTOR_BUFFER_SIZE];
   
           if (GetHomedPath(PEGASUS_PLANNED_CONFIG_FILE_PATH, path) != 0)
           {
               Fatal(FL, "GetHomedPath() failed on \"%s\"",
                   PEGASUS_PLANNED_CONFIG_FILE_PATH);
           }
  
     if (DefineConfigPathMacro("repositoryDir", PEGASUS_REPOSITORY_DIR) != 0)          DefineMacro("plannedConfigFilePath", path);
         Fatal(FL, "missing \"repositoryDir\" configuration parameter.");      }
  
     /* Define ${passwordFilePath} */     /* Define ${passwordFilePath} */
  
     if (DefineConfigPathMacro("passwordFilePath", "cimserver.passwd") != 0)     if (DefineConfigPathMacro("passwordFilePath", "cimserver.passwd") != 0)
         Fatal(FL, "missing \"passwordFilePath\" configuration parameter.");         Fatal(FL, "missing \"passwordFilePath\" configuration parameter.");
  
     /* Define ${traceFilePath} */  
   
     if (DefineConfigPathMacro("traceFilePath", NULL) != 0)  
         Fatal(FL, "missing \"traceFilePath\" configuration parameter.");  
   
     /* Define ${sslKeyFilePath} */     /* Define ${sslKeyFilePath} */
  
     if (DefineConfigPathMacro("sslKeyFilePath", "file.pem") != 0)     if (DefineConfigPathMacro("sslKeyFilePath", "file.pem") != 0)
Line 298 
Line 298 
     if (DefineConfigPathMacro("crlStore", "crl") != 0)     if (DefineConfigPathMacro("crlStore", "crl") != 0)
         Fatal(FL, "missing \"crlStore\" configuration parameter.");         Fatal(FL, "missing \"crlStore\" configuration parameter.");
  
     /* Define ${policyConfigFilePath} */  
     {  
         char path[EXECUTOR_BUFFER_SIZE];  
   
         if (GetHomedPath(PEGASUS_POLICY_CONFIG_FILE_PATH, path) != 0)  
         {  
             Fatal(FL, "GetHomedPath() failed on \"%s\"",  
                 PEGASUS_POLICY_CONFIG_FILE_PATH);  
         }  
   
         DefineMacro("policyConfigFilePath", path);  
     }  
   
     /* Define ${privilegedUser} */     /* Define ${privilegedUser} */
  
     DefineMacro("privilegedUser", "root");     DefineMacro("privilegedUser", "root");
Line 334 
Line 321 
     int pair[2];     int pair[2];
     char username[EXECUTOR_BUFFER_SIZE];     char username[EXECUTOR_BUFFER_SIZE];
     int childPid;     int childPid;
     const char* repositoryDir;  
     struct Options options;     struct Options options;
  
     /* Get options. */     /* Get options. */
Line 355 
Line 341 
     if (options.shutdown)     if (options.shutdown)
         ExecShutdown();         ExecShutdown();
  
     /* Load the dynamic policy file. */  
   
     LoadDynamicPolicy();  
   
     /* Process --policy and --macros options. */     /* Process --policy and --macros options. */
  
     if (options.policy || options.macros)      if (options.dump)
     {     {
         if (options.policy)  
             DumpPolicy(1);             DumpPolicy(1);
   
         if (options.macros)  
             DumpMacros();             DumpMacros();
   
         exit(0);         exit(0);
     }     }
  
Line 417 
Line 395 
  
     /* Open the log. */     /* Open the log. */
  
     OpenLog("cimexecutor", options.perror);      OpenLog("cimserver");
  
     Log(LL_INFORMATION, "starting");     Log(LL_INFORMATION, "starting");
  
Line 445 
Line 423 
  
     GetServerUser(&globals.childUid, &globals.childGid);     GetServerUser(&globals.childUid, &globals.childGid);
  
     /* Get repositoryDir for child. */  
   
     if ((repositoryDir = FindMacro("repositoryDir")) == NULL)  
         Fatal(FL, "failed to find repositoryDir macro");  
   
     /* Fork child process. */     /* Fork child process. */
  
     childPid = fork();     childPid = fork();
Line 459 
Line 432 
         /* Child. */         /* Child. */
         close(pair[1]);         close(pair[1]);
         Child(argc, argv, cimservermainPath, globals.childUid,         Child(argc, argv, cimservermainPath, globals.childUid,
             globals.childGid, pair[0], repositoryDir);              globals.childGid, pair[0]);
     }     }
     else if (childPid > 0)     else if (childPid > 0)
     {     {
         /* Parent. */         /* Parent. */
         close(pair[0]);         close(pair[0]);
         Parent(pair[1], childPid);          Parent(pair[1], childPid, options.bindVerbose);
     }     }
     else     else
     {     {


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2