(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.1 and 1.1.2.2

version 1.1.2.1, 2007/01/04 04:43:33 version 1.1.2.2, 2007/01/07 21:38:58
Line 214 
Line 214 
  
     /* Save as global so it can be used in error and log messages. */     /* Save as global so it can be used in error and log messages. */
  
     globalArg0 = argv[0];      globals.arg0 = argv[0];
  
     /* Get absolute cimservermain program name. */     /* Get absolute cimservermain program name. */
  
Line 231 
Line 231 
  
     /* If CIMSERVERMAIN is already running, warn and exit now. */     /* If CIMSERVERMAIN is already running, warn and exit now. */
  
   
     if (TestCimServerProcess() == 0)     if (TestCimServerProcess() == 0)
     {     {
         fprintf(stderr,         fprintf(stderr,
             "%s: cimserver is already running (the PID found in the file "             "%s: cimserver is already running (the PID found in the file "
             "\"%s\" corresponds to an existing process named \"%s\").\n\n",             "\"%s\" corresponds to an existing process named \"%s\").\n\n",
             globalArg0, PEGASUS_CIMSERVER_START_FILE, CIMSERVERMAIN);              globals.arg0, PEGASUS_CIMSERVER_START_FILE, CIMSERVERMAIN);
  
         exit(1);         exit(1);
     }     }
  
       /* Get enableAuthentication configuration option. */
   
       {
           char buffer[EXECUTOR_BUFFER_SIZE];
   
           if (GetConfigParam(argc, argv, "enableAuthentication", buffer) == 0 &&
               strcasecmp(buffer, "true") == 0)
           {
               globals.enableAuthentication = 1;
           }
       }
   
     /* Create a socket pair for communicating with the child process. */     /* Create a socket pair for communicating with the child process. */
  
     if (CreateSocketPair(pair) != 0)     if (CreateSocketPair(pair) != 0)
Line 279 
Line 290 
     if (setuid(0) != 0 || setgid(0) != 0)     if (setuid(0) != 0 || setgid(0) != 0)
     {     {
         Log(LL_FATAL, "attempted to run program as non-root user");         Log(LL_FATAL, "attempted to run program as non-root user");
         fprintf(stderr, "%s: this program must be run as root\n", globalArg0);          fprintf(stderr, "%s: this program must be run as root\n", globals.arg0);
         exit(0);         exit(0);
     }     }
  
       /* Warn if authentication not enabled (strange use of executor if not). */
   
       if (!globals.enableAuthentication)
           Log(LL_WARNING, "authentication is NOT enabled");
       else
           Log(LL_INFORMATION, "authentication is enabled");
   
     /* Print user info. */     /* Print user info. */
  
     if (GetUserName(getuid(), username) != 0)     if (GetUserName(getuid(), username) != 0)
Line 294 
Line 312 
     /* Determine user for running cimservermain. */     /* Determine user for running cimservermain. */
  
     GetServerUser(     GetServerUser(
         argc, argv, cimservermainPath, &globalChildUid, &globalChildGid);          argc, argv, cimservermainPath, &globals.childUid, &globals.childGid);
  
     /* Fork child process. */     /* Fork child process. */
  
Line 305 
Line 323 
         /* Child. */         /* Child. */
         close(pair[1]);         close(pair[1]);
         Child(argc, argv,         Child(argc, argv,
             cimservermainPath, globalChildUid, globalChildGid, pair[0]);              cimservermainPath, globals.childUid, globals.childGid, pair[0]);
     }     }
     else if (childPid > 0)     else if (childPid > 0)
     {     {


Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2