Changeset 34709 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Dec 3, 2010 5:38:01 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 68511
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
r34255 r34709 1210 1210 if (RT_SUCCESS(rc)) 1211 1211 { 1212 /* If no user name specified run with current credentials. 1213 * This is prohibited via official Main API! */ 1214 if (!strlen(pszAsUser)) 1215 fFlags &= ~RTPROC_FLAGS_SERVICE; 1212 uint32_t uProcFlags = 0; 1213 if (fFlags) 1214 { 1215 /* Process Main flag "ExecuteProcessFlag_Hidden". */ 1216 if (fFlags & RT_BIT(2)) 1217 uProcFlags = RTPROC_FLAGS_HIDDEN; 1218 } 1219 1220 /* If no user name specified run with current credentials (e.g. 1221 * full service/system rights). This is prohibited via official Main API! 1222 * 1223 * Otherwise use the RTPROC_FLAGS_SERVICE to use some special authentication 1224 * code (at least on Windows) for running processes as different users 1225 * started from our system service. */ 1226 if (strlen(pszAsUser)) 1227 uProcFlags |= RTPROC_FLAGS_SERVICE; 1216 1228 1217 1229 /* Do normal execution. */ 1218 rc = RTProcCreateEx(szExecExp, papszArgsExp, hEnv, fFlags,1230 rc = RTProcCreateEx(szExecExp, papszArgsExp, hEnv, uProcFlags, 1219 1231 phStdIn, phStdOut, phStdErr, 1220 1232 strlen(pszAsUser) ? pszAsUser : NULL, … … 1308 1320 { 1309 1321 RTPROCESS hProcess; 1310 rc = VBoxServiceControlExecCreateProcess(pData->pszCmd, pData->papszArgs, hEnv, RTPROC_FLAGS_SERVICE,1322 rc = VBoxServiceControlExecCreateProcess(pData->pszCmd, pData->papszArgs, hEnv, pData->uFlags, 1311 1323 phStdIn, phStdOut, phStdErr, 1312 1324 pData->pszUser, pData->pszPassword,
Note:
See TracChangeset
for help on using the changeset viewer.