version 1.1.4.4, 2007/04/06 00:22:31
|
version 1.1.4.5, 2007/04/20 14:39:14
|
|
|
DefineMacro("currentConfigFilePath", path); | DefineMacro("currentConfigFilePath", path); |
} | } |
| |
/* Define ${repositoryDir} */ |
|
|
|
if (DefineConfigPathMacro("repositoryDir", PEGASUS_REPOSITORY_DIR) != 0) |
|
Fatal(FL, "missing \"repositoryDir\" configuration parameter."); |
|
|
|
/* Define ${passwordFilePath} */ | /* Define ${passwordFilePath} */ |
| |
if (DefineConfigPathMacro("passwordFilePath", "cimserver.passwd") != 0) | if (DefineConfigPathMacro("passwordFilePath", "cimserver.passwd") != 0) |
|
|
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. */ |
|
|
| |
/* Open the log. */ | /* Open the log. */ |
| |
OpenLog("cimexecutor", options.perror); |
OpenLog("cimserver", options.perror); |
| |
Log(LL_INFORMATION, "starting"); | Log(LL_INFORMATION, "starting"); |
| |
|
|
| |
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(); |
|
|
/* 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) |
{ | { |