Changeset 92667 in vbox for trunk/src/VBox/Additions/common/VBoxService
- Timestamp:
- Dec 1, 2021 3:14:05 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
r92666 r92667 1425 1425 VGSvcVerbose(3, "Starting process '%s' ...\n", szExecExp); 1426 1426 1427 const char *pszUser = pszAsUser;1428 1427 #ifdef RT_OS_WINDOWS 1429 1428 /* If a domain name is given, construct an UPN (User Principle Name) with 1430 1429 * the domain name built-in, e.g. "[email protected]". */ 1431 1430 char *pszUserUPN = NULL; 1432 if ( pszDomain1433 && *pszDomain != '\0')1434 {1435 i nt cbUserUPN = RTStrAPrintf(&pszUserUPN, "%s@%s", pszAsUser, pszDomain);1436 if (cbUserUPN > 0)1437 {1438 pszUser = pszUserUPN;1439 VGSvcVerbose(3, "Using UPN: %s\n", pszUserUPN);1440 }1441 } 1442 #endif 1443 1444 /* Do normal execution. */1445 rc = RTProcCreateEx(szExecExp, papszArgsExp, hEnv, fProcCreateFlags,1446 phStdIn, phStdOut, phStdErr,1447 pszUser,1448 pszPassword && *pszPassword ? pszPassword : NULL,1449 NULL /*pvExtraData*/,1450 phProcess); 1431 if (pszDomain && *pszDomain != '\0') 1432 { 1433 pszUserUPN = pszAsUser = RTStrAPrintf2("%s@%s", pszAsUser, pszDomain); 1434 if (pszAsUser) 1435 VGSvcVerbose(3, "Using UPN: %s\n", pszAsUser); 1436 else 1437 rc = VERR_NO_STR_MEMORY; 1438 } 1439 if (RT_SUCCESS(rc)) 1440 #endif 1441 { 1442 /* Do normal execution. */ 1443 rc = RTProcCreateEx(szExecExp, papszArgsExp, hEnv, fProcCreateFlags, 1444 phStdIn, phStdOut, phStdErr, 1445 pszAsUser, 1446 pszPassword && *pszPassword ? pszPassword : NULL, 1447 NULL /*pvExtraData*/, 1448 phProcess); 1449 1451 1450 #ifdef RT_OS_WINDOWS 1452 if (pszUserUPN)1453 1451 RTStrFree(pszUserUPN); 1454 1452 #endif 1455 VGSvcVerbose(3, "Starting process '%s' returned rc=%Rrc\n", szExecExp, rc);1456 1453 VGSvcVerbose(3, "Starting process '%s' returned rc=%Rrc\n", szExecExp, rc); 1454 } 1457 1455 vgsvcGstCtrlProcessFreeArgv(papszArgsExp); 1458 1456 }
Note:
See TracChangeset
for help on using the changeset viewer.