version 1.5, 2007/06/13 21:23:56
|
version 1.6, 2007/06/15 17:40:06
|
|
|
| |
if (DefineConfigPathMacro("crlStore", "crl") != 0) | if (DefineConfigPathMacro("crlStore", "crl") != 0) |
Fatal(FL, "missing \"crlStore\" configuration parameter."); | Fatal(FL, "missing \"crlStore\" configuration parameter."); |
|
|
/* Define ${privilegedUser} */ |
|
|
|
DefineMacro("privilegedUser", "root"); |
|
|
|
/* Define ${cimserverUser} */ |
|
|
|
DefineMacro("cimserverUser", PEGASUS_CIMSERVERMAIN_USER); |
|
} | } |
| |
/* | /* |
|
|
const char* cimservermainPath; | const char* cimservermainPath; |
int pair[2]; | int pair[2]; |
char username[EXECUTOR_BUFFER_SIZE]; | char username[EXECUTOR_BUFFER_SIZE]; |
|
const char* childUserName; |
|
int childUid; |
|
int childGid; |
int childPid; | int childPid; |
struct Options options; | struct Options options; |
| |
|
|
globals.argc = argc; | globals.argc = argc; |
globals.argv = argv; | globals.argv = argv; |
| |
|
/* Open the log. */ |
|
|
|
OpenLog("cimserver"); |
|
|
/* Define macros needed by the executor. */ | /* Define macros needed by the executor. */ |
| |
DefineExecutorMacros(); | DefineExecutorMacros(); |
| |
/* If shuting down, then run CIMSHUTDOWN client. */ |
/* If shutting down, then run CIMSHUTDOWN client. */ |
| |
if (options.shutdown) | if (options.shutdown) |
ExecShutdown(); | ExecShutdown(); |
|
|
| |
InitLogLevel(); | InitLogLevel(); |
| |
/* Open the log. */ |
|
|
|
OpenLog("cimserver"); |
|
|
|
Log(LL_INFORMATION, "starting"); | Log(LL_INFORMATION, "starting"); |
| |
/* Be sure this process is running as root (otherwise fail). */ | /* Be sure this process is running as root (otherwise fail). */ |
|
|
| |
/* Determine user for running CIMSERVERMAIN. */ | /* Determine user for running CIMSERVERMAIN. */ |
| |
GetServerUser(&globals.childUserName, &globals.childUid, &globals.childGid); |
GetServerUser(&childUserName, &childUid, &childGid); |
| |
/* Fork child process. */ | /* Fork child process. */ |
| |
|
|
argc, | argc, |
argv, | argv, |
cimservermainPath, | cimservermainPath, |
globals.childUserName, |
childUserName, |
globals.childUid, |
childUid, |
globals.childGid, |
childGid, |
pair[0]); | pair[0]); |
} | } |
else if (childPid > 0) | else if (childPid > 0) |