Changeset 84147 in vbox
- Timestamp:
- May 5, 2020 3:34:38 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
include/VBox/GuestHost/GuestControl.h (modified) (1 diff)
-
src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp (modified) (4 diffs)
-
src/VBox/Additions/common/VBoxService/VBoxServiceControl.h (modified) (6 diffs)
-
src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp (modified) (22 diffs)
-
src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/GuestControl.h
r83651 r84147 135 135 /** @} */ 136 136 137 /** @name Defines for guest process arraylengths.137 /** @name Defines for maximum guest process buffer lengths. 138 138 * @{ 139 139 */ -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
r83974 r84147 395 395 * Retrieve the message parameters. 396 396 */ 397 VBOXSERVICECTRLSESSIONSTARTUPINFO ssInfo = { 0 }; 398 int rc = VbglR3GuestCtrlSessionGetOpen(pHostCtx, 399 &ssInfo.uProtocol, 400 ssInfo.szUser, sizeof(ssInfo.szUser), 401 ssInfo.szPassword, sizeof(ssInfo.szPassword), 402 ssInfo.szDomain, sizeof(ssInfo.szDomain), 403 &ssInfo.fFlags, &ssInfo.uSessionID); 397 VBOXSERVICECTRLSESSIONSTARTUPINFO startupInfo; 398 int rc = VgsvcGstCtrlSessionStartupInfoInit(&startupInfo); 399 if (RT_FAILURE(rc)) 400 return rc; 401 402 rc = VbglR3GuestCtrlSessionGetOpen(pHostCtx, 403 &startupInfo.uProtocol, 404 startupInfo.pszUser, startupInfo.cbUser, 405 startupInfo.pszPassword, startupInfo.cbPassword, 406 startupInfo.pszDomain, startupInfo.cbDomain, 407 &startupInfo.fFlags, &startupInfo.uSessionID); 404 408 if (RT_SUCCESS(rc)) 405 409 { … … 407 411 * Flat out refuse to work with protocol v1 hosts. 408 412 */ 409 if (s sInfo.uProtocol == 2)410 { 411 pHostCtx->uProtocol = s sInfo.uProtocol;413 if (startupInfo.uProtocol == 2) 414 { 415 pHostCtx->uProtocol = startupInfo.uProtocol; 412 416 VGSvcVerbose(3, "Client ID=%RU32 now is using protocol %RU32\n", pHostCtx->uClientID, pHostCtx->uProtocol); 413 417 414 418 /** @todo Someone explain why this code isn't in this file too? v1 support? */ 415 rc = VGSvcGstCtrlSessionThreadCreate(&g_lstControlSessionThreads, &s sInfo, NULL /* ppSessionThread */);419 rc = VGSvcGstCtrlSessionThreadCreate(&g_lstControlSessionThreads, &startupInfo, NULL /* ppSessionThread */); 416 420 /* Report failures to the host (successes are taken care of by the session thread). */ 417 421 } 418 422 else 419 423 { 420 VGSvcError("The host wants to use protocol v%u, we only support v2!\n", s sInfo.uProtocol);424 VGSvcError("The host wants to use protocol v%u, we only support v2!\n", startupInfo.uProtocol); 421 425 rc = VERR_VERSION_MISMATCH; 422 426 } … … 433 437 VbglR3GuestCtrlMsgSkip(pHostCtx->uClientID, rc, UINT32_MAX); 434 438 } 439 440 VgsvcGstCtrlSessionStartupInfoDestroy(&startupInfo); 441 435 442 VGSvcVerbose(3, "Opening a new guest session returned rc=%Rrc\n", rc); 436 443 return rc; … … 452 459 RTListForEach(&g_lstControlSessionThreads, pThread, VBOXSERVICECTRLSESSIONTHREAD, Node) 453 460 { 454 if (pThread->StartupInfo.uSessionID == idSession) 461 if ( pThread->pStartupInfo 462 && pThread->pStartupInfo->uSessionID == idSession) 455 463 { 456 464 rc = VGSvcGstCtrlSessionThreadDestroy(pThread, fFlags); -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.h
r83409 r84147 81 81 uint32_t uSessionID; 82 82 /** User name (account) to start the guest session under. */ 83 char szUser[GUESTPROCESS_MAX_USER_LEN]; 83 char *pszUser; 84 /** Size (in bytes) of allocated pszUser. */ 85 uint32_t cbUser; 84 86 /** Password of specified user name (account). */ 85 char szPassword[GUESTPROCESS_MAX_PASSWORD_LEN]; 87 char *pszPassword; 88 /** Size (in bytes) of allocated pszPassword. */ 89 uint32_t cbPassword; 86 90 /** Domain of the user account. */ 87 char szDomain[GUESTPROCESS_MAX_DOMAIN_LEN]; 91 char *pszDomain; 92 /** Size (in bytes) of allocated pszDomain. */ 93 uint32_t cbDomain; 88 94 /** Session creation flags. 89 95 * @sa VBOXSERVICECTRLSESSIONSTARTUPFLAG_* flags. */ … … 104 110 RTLISTNODE Node; 105 111 /** The sessions's startup info. */ 106 VBOXSERVICECTRLSESSIONSTARTUPINFO StartupInfo; 112 PVBOXSERVICECTRLSESSIONSTARTUPINFO 113 pStartupInfo; 107 114 /** Critical section for thread-safe use. */ 108 115 RTCRITSECT CritSect; … … 207 214 typedef struct VBOXSERVICECTRLPROCSTARTUPINFO 208 215 { 209 /** Full qualified path of process to start (without arguments). */ 210 char szCmd[GUESTPROCESS_MAX_CMD_LEN]; 216 /** Full qualified path of process to start (without arguments). 217 * Note: This is *not* argv[0]! */ 218 char *pszCmd; 219 /** Size (in bytes) of allocated pszCmd. */ 220 uint32_t cbCmd; 211 221 /** Process execution flags. @sa */ 212 uint32_t uFlags;222 uint32_t fFlags; 213 223 /** Command line arguments. */ 214 char szArgs[GUESTPROCESS_MAX_ARGS_LEN]; 224 char *pszArgs; 225 /** Size (in bytes) of allocated pszArgs. */ 226 uint32_t cbArgs; 215 227 /** Number of arguments specified in pszArgs. */ 216 uint32_t uNumArgs;228 uint32_t cArgs; 217 229 /** String of environment variables ("FOO=BAR") to pass to the process 218 230 * to start. */ 219 char szEnv[GUESTPROCESS_MAX_ENV_LEN];231 char *pszEnv; 220 232 /** Size (in bytes) of environment variables block. */ 221 233 uint32_t cbEnv; 222 234 /** Number of environment variables specified in pszEnv. */ 223 uint32_t uNumEnvVars;235 uint32_t cEnvVars; 224 236 /** User name (account) to start the process under. */ 225 char szUser[GUESTPROCESS_MAX_USER_LEN]; 237 char *pszUser; 238 /** Size (in bytes) of allocated pszUser. */ 239 uint32_t cbUser; 226 240 /** Password of specified user name (account). */ 227 char szPassword[GUESTPROCESS_MAX_PASSWORD_LEN]; 241 char *pszPassword; 242 /** Size (in bytes) of allocated pszPassword. */ 243 uint32_t cbPassword; 228 244 /** Domain to be used for authenticating the specified user name (account). */ 229 char szDomain[GUESTPROCESS_MAX_DOMAIN_LEN]; 245 char *pszDomain; 246 /** Size (in bytes) of allocated pszDomain. */ 247 uint32_t cbDomain; 230 248 /** Time limit (in ms) of the process' life time. */ 231 249 uint32_t uTimeLimitMS; … … 269 287 RTCRITSECT CritSect; 270 288 /** Process startup information. */ 271 VBOXSERVICECTRLPROCSTARTUPINFO272 StartupInfo;289 PVBOXSERVICECTRLPROCSTARTUPINFO 290 pStartupInfo; 273 291 /** The process' PID assigned by the guest OS. */ 274 292 uint32_t uPID; … … 318 336 /** @name Per-session functions. 319 337 * @{ */ 338 extern int VgsvcGstCtrlSessionStartupInfoInit(PVBOXSERVICECTRLSESSIONSTARTUPINFO pStartupInfo); 339 extern void VgsvcGstCtrlSessionStartupInfoDestroy(PVBOXSERVICECTRLSESSIONSTARTUPINFO pStartupInfo); 340 320 341 extern PVBOXSERVICECTRLPROCESS VGSvcGstCtrlSessionRetainProcess(PVBOXSERVICECTRLSESSION pSession, uint32_t uPID); 321 342 extern int VGSvcGstCtrlSessionClose(PVBOXSERVICECTRLSESSION pSession); … … 330 351 /** @name Per-guest process functions. 331 352 * @{ */ 353 extern int VgsvcGstCtrlProcessStartupInfoInit(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo); 354 extern int VgsvcGstCtrlProcessStartupInfoInitEx(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo, size_t cbEnv, size_t cbArgs); 355 extern void VgsvcGstCtrlProcessStartupInfoDestroy(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo); 356 extern void VgsvcGstCtrlProcessStartupInfoFree(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo); 357 332 358 extern int VGSvcGstCtrlProcessFree(PVBOXSERVICECTRLPROCESS pProcess); 333 359 extern int VGSvcGstCtrlProcessHandleInput(PVBOXSERVICECTRLPROCESS pProcess, PVBGLR3GUESTCTRLCMDCTX pHostCtx, bool fPendingClose, void *pvBuf, uint32_t cbBuf); -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
r84140 r84147 62 62 63 63 /** 64 * Initializes a process startup info, extended version. 65 * 66 * @returns VBox status code. 67 * @param pStartupInfo Process startup info to initializes. 68 * @param cbArgs Size (in bytes) to use for the arguments buffer. 69 * @param cbEnv Size (in bytes) to use for the environment buffer. 70 */ 71 int VgsvcGstCtrlProcessStartupInfoInitEx(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo, 72 size_t cbArgs, size_t cbEnv) 73 { 74 AssertPtrReturn(pStartupInfo, VERR_INVALID_POINTER); 75 AssertReturn(cbArgs, VERR_INVALID_PARAMETER); 76 AssertReturn(cbEnv, VERR_INVALID_PARAMETER); 77 78 RT_BZERO(pStartupInfo, sizeof(VBOXSERVICECTRLPROCSTARTUPINFO)); 79 80 #define ALLOC_STR(a_Str, a_cb) \ 81 if ((a_cb) > 0) \ 82 { \ 83 pStartupInfo->psz##a_Str = RTStrAlloc(a_cb); \ 84 AssertPtrBreak(pStartupInfo->psz##a_Str); \ 85 pStartupInfo->cb##a_Str = a_cb; \ 86 } 87 88 do 89 { 90 ALLOC_STR(Cmd, sizeof(char) * GUESTPROCESS_MAX_CMD_LEN); 91 ALLOC_STR(Args, cbArgs); 92 ALLOC_STR(Env, cbEnv); 93 ALLOC_STR(User, sizeof(char) * GUESTPROCESS_MAX_USER_LEN); 94 ALLOC_STR(Password, sizeof(char) * GUESTPROCESS_MAX_PASSWORD_LEN); 95 ALLOC_STR(Domain, sizeof(char) * GUESTPROCESS_MAX_DOMAIN_LEN); 96 97 return VINF_SUCCESS; 98 99 } while (0); 100 101 #undef ALLOC_STR 102 103 VgsvcGstCtrlProcessStartupInfoDestroy(pStartupInfo); 104 return VERR_NO_MEMORY; 105 } 106 107 /** 108 * Initializes a process startup info with default values. 109 * 110 * @param pStartupInfo Process startup info to initializes. 111 */ 112 int VgsvcGstCtrlProcessStartupInfoInit(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo) 113 { 114 return VgsvcGstCtrlProcessStartupInfoInitEx(pStartupInfo, 115 GUESTPROCESS_MAX_ARGS_LEN, GUESTPROCESS_MAX_ENV_LEN); 116 } 117 118 /** 119 * Destroys a process startup info. 120 * 121 * @param pStartupInfo Process startup info to destroy. 122 */ 123 void VgsvcGstCtrlProcessStartupInfoDestroy(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo) 124 { 125 if (!pStartupInfo) 126 return; 127 128 RTStrFree(pStartupInfo->pszCmd); 129 RTStrFree(pStartupInfo->pszArgs); 130 RTStrFree(pStartupInfo->pszEnv); 131 RTStrFree(pStartupInfo->pszUser); 132 RTStrFree(pStartupInfo->pszPassword); 133 RTStrFree(pStartupInfo->pszDomain); 134 135 RT_BZERO(pStartupInfo, sizeof(VBOXSERVICECTRLPROCSTARTUPINFO)); 136 } 137 138 /** 139 * Free's a process startup info. 140 * 141 * @param pStartupInfo Process startup info to free. 142 * The pointer will not be valid anymore after return. 143 */ 144 void VgsvcGstCtrlProcessStartupInfoFree(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo) 145 { 146 if (!pStartupInfo) 147 return; 148 149 VgsvcGstCtrlProcessStartupInfoDestroy(pStartupInfo); 150 151 RTMemFree(pStartupInfo); 152 pStartupInfo = NULL; 153 } 154 155 /** 156 * Duplicates a process startup info. 157 * 158 * @returns Duplicated process startup info on success, or NULL on error. 159 * @param pStartupInfo Process startup info to duplicate. 160 */ 161 static PVBOXSERVICECTRLPROCSTARTUPINFO vgsvcGstCtrlProcessStartupInfoDup(PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo) 162 { 163 AssertPtrReturn(pStartupInfo, NULL); 164 165 PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfoDup = (PVBOXSERVICECTRLPROCSTARTUPINFO) 166 RTMemDup(pStartupInfo, sizeof(VBOXSERVICECTRLPROCSTARTUPINFO)); 167 if (pStartupInfoDup) 168 { 169 do 170 { 171 pStartupInfoDup->pszCmd = NULL; 172 pStartupInfoDup->pszArgs = NULL; 173 pStartupInfoDup->pszEnv = NULL; 174 pStartupInfoDup->pszUser = NULL; 175 pStartupInfoDup->pszPassword = NULL; 176 pStartupInfoDup->pszDomain = NULL; 177 178 #define DUP_STR(a_Str) \ 179 if (pStartupInfo->cb##a_Str) \ 180 { \ 181 pStartupInfoDup->psz##a_Str = (char *)RTMemDup(pStartupInfo->psz##a_Str, pStartupInfo->cb##a_Str); \ 182 AssertPtrBreak(pStartupInfoDup->psz##a_Str); \ 183 pStartupInfoDup->cb##a_Str = pStartupInfo->cb##a_Str; \ 184 } 185 186 DUP_STR(Cmd); 187 DUP_STR(Args); 188 DUP_STR(Env); 189 DUP_STR(User); 190 DUP_STR(Password); 191 DUP_STR(Domain); 192 193 #undef DUP_STR 194 195 return pStartupInfoDup; 196 197 } while (0); /* To use break macros above. */ 198 199 VgsvcGstCtrlProcessStartupInfoFree(pStartupInfoDup); 200 } 201 202 return NULL; 203 } 204 205 /** 64 206 * Initialies the passed in thread data structure with the parameters given. 65 207 * … … 117 259 AssertReleaseRC(rc); 118 260 119 /* Copy over startup info. */ 120 memcpy(&pProcess->StartupInfo, pStartupInfo, sizeof(VBOXSERVICECTRLPROCSTARTUPINFO)); 261 /* Duplicate startup info. */ 262 pProcess->pStartupInfo = vgsvcGstCtrlProcessStartupInfoDup(pStartupInfo); 263 AssertPtrReturn(pProcess->pStartupInfo, VERR_NO_MEMORY); 121 264 122 265 /* Adjust timeout value. */ 123 if ( pProcess-> StartupInfo.uTimeLimitMS == UINT32_MAX124 || pProcess-> StartupInfo.uTimeLimitMS == 0)125 pProcess-> StartupInfo.uTimeLimitMS = RT_INDEFINITE_WAIT;266 if ( pProcess->pStartupInfo->uTimeLimitMS == UINT32_MAX 267 || pProcess->pStartupInfo->uTimeLimitMS == 0) 268 pProcess->pStartupInfo->uTimeLimitMS = RT_INDEFINITE_WAIT; 126 269 127 270 if (RT_FAILURE(rc)) /* Clean up on failure. */ … … 151 294 AssertReturn(pProcess->fStopped, VERR_WRONG_ORDER); 152 295 AssertReturn(pProcess->fShutdown, VERR_WRONG_ORDER); 296 297 VgsvcGstCtrlProcessStartupInfoFree(pProcess->pStartupInfo); 298 pProcess->pStartupInfo = NULL; 153 299 154 300 /* … … 527 673 */ 528 674 VGSvcVerbose(2, "[PID %RU32]: Process '%s' started, CID=%u, User=%s, cMsTimeout=%RU32\n", 529 pProcess->uPID, pProcess-> StartupInfo.szCmd, pProcess->uContextID,530 pProcess-> StartupInfo.szUser, pProcess->StartupInfo.uTimeLimitMS);675 pProcess->uPID, pProcess->pStartupInfo->pszCmd, pProcess->uContextID, 676 pProcess->pStartupInfo->pszUser, pProcess->pStartupInfo->uTimeLimitMS); 531 677 VBGLR3GUESTCTRLCMDCTX ctxStart = { g_idControlSvcClient, pProcess->uContextID }; 532 678 rc = VbglR3GuestCtrlProcCbStatus(&ctxStart, … … 670 816 */ 671 817 uint32_t cMilliesLeft = RT_INDEFINITE_WAIT; 672 if ( pProcess-> StartupInfo.uTimeLimitMS != RT_INDEFINITE_WAIT673 && pProcess-> StartupInfo.uTimeLimitMS != 0)818 if ( pProcess->pStartupInfo->uTimeLimitMS != RT_INDEFINITE_WAIT 819 && pProcess->pStartupInfo->uTimeLimitMS != 0) 674 820 { 675 821 uint64_t u64Now = RTTimeMilliTS(); 676 822 uint64_t cMsElapsed = u64Now - uMsStart; 677 if (cMsElapsed >= pProcess-> StartupInfo.uTimeLimitMS)823 if (cMsElapsed >= pProcess->pStartupInfo->uTimeLimitMS) 678 824 { 679 825 fProcessTimedOut = true; … … 685 831 686 832 VGSvcVerbose(3, "[PID %RU32]: Timed out (%RU64ms elapsed > %RU32ms timeout), killing ...\n", 687 pProcess->uPID, cMsElapsed, pProcess-> StartupInfo.uTimeLimitMS);833 pProcess->uPID, cMsElapsed, pProcess->pStartupInfo->uTimeLimitMS); 688 834 689 835 rc2 = RTProcTerminate(pProcess->hProcess); … … 696 842 } 697 843 else 698 cMilliesLeft = pProcess-> StartupInfo.uTimeLimitMS - (uint32_t)cMsElapsed;844 cMilliesLeft = pProcess->pStartupInfo->uTimeLimitMS - (uint32_t)cMsElapsed; 699 845 } 700 846 … … 816 962 VGSvcVerbose(3, "[PID %RU32]: Got terminated because system/service is about to shutdown\n", pProcess->uPID); 817 963 uStatus = PROC_STS_DWN; /* Service is stopping, process was killed. */ 818 fFlags = pProcess-> StartupInfo.uFlags; /* Return handed-in execution flags back to the host. */964 fFlags = pProcess->pStartupInfo->fFlags; /* Return handed-in execution flags back to the host. */ 819 965 } 820 966 else if (fProcessAlive) … … 1507 1653 { 1508 1654 AssertPtrReturn(pProcess, VERR_INVALID_POINTER); 1509 VGSvcVerbose(3, "Thread of process pThread=0x%p = '%s' started\n", pProcess, pProcess-> StartupInfo.szCmd);1510 1511 VGSvcVerbose(3, "Guest process '%s', flags=0x%x\n", pProcess-> StartupInfo.szCmd, pProcess->StartupInfo.uFlags);1655 VGSvcVerbose(3, "Thread of process pThread=0x%p = '%s' started\n", pProcess, pProcess->pStartupInfo->pszCmd); 1656 1657 VGSvcVerbose(3, "Guest process '%s', flags=0x%x\n", pProcess->pStartupInfo->pszCmd, pProcess->pStartupInfo->fFlags); 1512 1658 1513 1659 int rc = VGSvcGstCtrlSessionProcessAdd(pProcess->pSession, pProcess); … … 1515 1661 { 1516 1662 VGSvcError("Error while adding guest process '%s' (%p) to session process list, rc=%Rrc\n", 1517 pProcess-> StartupInfo.szCmd, pProcess, rc);1663 pProcess->pStartupInfo->pszCmd, pProcess, rc); 1518 1664 RTThreadUserSignal(RTThreadSelf()); 1519 1665 return rc; … … 1526 1672 */ 1527 1673 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: fHostFeatures0 = %#x\n", g_fControlHostFeatures0); 1528 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.szCmd = '%s'\n", pProcess-> StartupInfo.szCmd);1529 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.uNumArgs = '%RU32'\n", pProcess-> StartupInfo.uNumArgs);1674 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.szCmd = '%s'\n", pProcess->pStartupInfo->pszCmd); 1675 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.uNumArgs = '%RU32'\n", pProcess->pStartupInfo->cArgs); 1530 1676 #ifdef DEBUG /* Never log this stuff in release mode! */ 1531 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.szArgs = '%s'\n", pProcess-> StartupInfo.szArgs);1677 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.szArgs = '%s'\n", pProcess->pStartupInfo->pszArgs); 1532 1678 #endif 1533 1679 … … 1535 1681 int cArgs = 0; /* Initialize in case of RTGetOptArgvFromString() is failing ... */ 1536 1682 rc = RTGetOptArgvFromString(&papszArgs, &cArgs, 1537 pProcess-> StartupInfo.uNumArgs > 0 ? pProcess->StartupInfo.szArgs : "",1683 pProcess->pStartupInfo->cArgs > 0 ? pProcess->pStartupInfo->pszArgs : "", 1538 1684 RTGETOPTARGV_CNV_QUOTE_BOURNE_SH, NULL); 1539 1685 … … 1548 1694 /* Did we get the same result? 1549 1695 * Take into account that we might not have supplied a (correct) argv[0] from the host. */ 1550 AssertMsg((int)pProcess-> StartupInfo.uNumArgs == cArgsToCheck,1696 AssertMsg((int)pProcess->pStartupInfo->cArgs == cArgsToCheck, 1551 1697 ("rc=%Rrc, StartupInfo.uNumArgs=%RU32 != cArgsToCheck=%d, cArgs=%d, fHostFeatures0=%#x\n", 1552 rc, pProcess-> StartupInfo.uNumArgs, cArgsToCheck, cArgs, g_fControlHostFeatures0));1698 rc, pProcess->pStartupInfo->cArgs, cArgsToCheck, cArgs, g_fControlHostFeatures0)); 1553 1699 #endif 1554 1700 … … 1556 1702 * Create the environment. 1557 1703 */ 1558 uint32_t const cbEnv = pProcess-> StartupInfo.cbEnv;1704 uint32_t const cbEnv = pProcess->pStartupInfo->cbEnv; 1559 1705 if (RT_SUCCESS(rc)) 1560 AssertStmt( cbEnv <= sizeof(pProcess->StartupInfo.szEnv)1561 || pProcess-> StartupInfo.uNumEnvVars == 0,1706 AssertStmt( cbEnv <= GUESTPROCESS_MAX_ENV_LEN 1707 || pProcess->pStartupInfo->cEnvVars == 0, 1562 1708 rc = VERR_INVALID_PARAMETER); 1563 1709 if (RT_SUCCESS(rc)) … … 1568 1714 { 1569 1715 VGSvcVerbose(3, "Additional environment variables: %RU32 (%RU32 bytes)\n", 1570 pProcess-> StartupInfo.uNumEnvVars, cbEnv);1571 1572 if ( pProcess-> StartupInfo.uNumEnvVars /** @todo r=bird: s/uNumEnvVars/cEnvVars/g */1716 pProcess->pStartupInfo->cEnvVars, cbEnv); 1717 1718 if ( pProcess->pStartupInfo->cEnvVars 1573 1719 && cbEnv > 0) 1574 1720 { … … 1576 1722 while (offCur < cbEnv) 1577 1723 { 1578 const char * const pszCur = &pProcess-> StartupInfo.szEnv[offCur];1724 const char * const pszCur = &pProcess->pStartupInfo->pszEnv[offCur]; 1579 1725 size_t const cchCur = RTStrNLen(pszCur, cbEnv - offCur); 1580 1726 AssertBreakStmt(cchCur < cbEnv - offCur, rc = VERR_INVALID_PARAMETER); … … 1605 1751 RTHANDLE hStdOut; 1606 1752 PRTHANDLE phStdOut; 1607 rc = vgsvcGstCtrlProcessSetupPipe( (pProcess-> StartupInfo.uFlags & EXECUTEPROCESSFLAG_WAIT_STDOUT)1753 rc = vgsvcGstCtrlProcessSetupPipe( (pProcess->pStartupInfo->fFlags & EXECUTEPROCESSFLAG_WAIT_STDOUT) 1608 1754 ? "|" : "/dev/null", 1609 1755 1 /*STDOUT_FILENO*/, … … 1613 1759 RTHANDLE hStdErr; 1614 1760 PRTHANDLE phStdErr; 1615 rc = vgsvcGstCtrlProcessSetupPipe( (pProcess-> StartupInfo.uFlags & EXECUTEPROCESSFLAG_WAIT_STDERR)1761 rc = vgsvcGstCtrlProcessSetupPipe( (pProcess->pStartupInfo->fFlags & EXECUTEPROCESSFLAG_WAIT_STDERR) 1616 1762 ? "|" : "/dev/null", 1617 1763 2 /*STDERR_FILENO*/, … … 1654 1800 bool fNeedsImpersonation = !(pProcess->pSession->fFlags & VBOXSERVICECTRLSESSION_FLAG_SPAWN); 1655 1801 1656 rc = vgsvcGstCtrlProcessCreateProcess(pProcess-> StartupInfo.szCmd, papszArgs, hEnv,1657 pProcess-> StartupInfo.uFlags,1802 rc = vgsvcGstCtrlProcessCreateProcess(pProcess->pStartupInfo->pszCmd, papszArgs, hEnv, 1803 pProcess->pStartupInfo->fFlags, 1658 1804 phStdIn, phStdOut, phStdErr, 1659 fNeedsImpersonation ? pProcess-> StartupInfo.szUser : NULL,1660 fNeedsImpersonation ? pProcess-> StartupInfo.szPassword : NULL,1661 fNeedsImpersonation ? pProcess-> StartupInfo.szDomain : NULL,1805 fNeedsImpersonation ? pProcess->pStartupInfo->pszUser : NULL, 1806 fNeedsImpersonation ? pProcess->pStartupInfo->pszPassword : NULL, 1807 fNeedsImpersonation ? pProcess->pStartupInfo->pszDomain : NULL, 1662 1808 &pProcess->hProcess); 1663 1809 if (RT_FAILURE(rc)) … … 1772 1918 1773 1919 VGSvcVerbose(3, "[PID %RU32]: Thread of process '%s' ended with rc=%Rrc (fSignalled=%RTbool)\n", 1774 pProcess->uPID, pProcess-> StartupInfo.szCmd, rc, fSignalled);1920 pProcess->uPID, pProcess->pStartupInfo->pszCmd, rc, fSignalled); 1775 1921 1776 1922 return rc; … … 1845 1991 { 1846 1992 VGSvcError("Creating thread for guest process '%s' failed: rc=%Rrc, pProcess=%p\n", 1847 pStartupInfo-> szCmd, rc, pProcess);1993 pStartupInfo->pszCmd, rc, pProcess); 1848 1994 1849 1995 VGSvcGstCtrlProcessFree(pProcess); … … 1860 2006 || RT_FAILURE(rc)) 1861 2007 { 1862 VGSvcError("Thread for process '%s' failed to start, rc=%Rrc\n", pStartupInfo-> szCmd, rc);2008 VGSvcError("Thread for process '%s' failed to start, rc=%Rrc\n", pStartupInfo->pszCmd, rc); 1863 2009 int rc2 = RTThreadWait(pProcess->Thread, RT_MS_1SEC * 30, NULL); 1864 2010 if (RT_SUCCESS(rc2)) -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r83612 r84147 1026 1026 } 1027 1027 1028 /** 1029 * Initializes a session startup info. 1030 * 1031 * @returns VBox status code. 1032 * @param pStartupInfo Session startup info to initializes. 1033 */ 1034 int VgsvcGstCtrlSessionStartupInfoInit(PVBOXSERVICECTRLSESSIONSTARTUPINFO pStartupInfo) 1035 { 1036 AssertPtrReturn(pStartupInfo, VERR_INVALID_POINTER); 1037 1038 RT_BZERO(pStartupInfo, sizeof(VBOXSERVICECTRLSESSIONSTARTUPINFO)); 1039 1040 #define ALLOC_STR(a_Str, a_cb) \ 1041 if ((a_cb) > 0) \ 1042 { \ 1043 pStartupInfo->psz##a_Str = RTStrAlloc(a_cb); \ 1044 AssertPtrBreak(pStartupInfo->psz##a_Str); \ 1045 pStartupInfo->cb##a_Str = a_cb; \ 1046 } 1047 1048 do 1049 { 1050 ALLOC_STR(User, sizeof(char) * GUESTPROCESS_MAX_USER_LEN); 1051 ALLOC_STR(Password, sizeof(char) * GUESTPROCESS_MAX_PASSWORD_LEN); 1052 ALLOC_STR(Domain, sizeof(char) * GUESTPROCESS_MAX_DOMAIN_LEN); 1053 1054 return VINF_SUCCESS; 1055 1056 } while (0); 1057 1058 #undef ALLOC_STR 1059 1060 VgsvcGstCtrlSessionStartupInfoDestroy(pStartupInfo); 1061 return VERR_NO_MEMORY; 1062 } 1063 1064 /** 1065 * Destroys a session startup info. 1066 * 1067 * @param pStartupInfo Session startup info to destroy. 1068 */ 1069 void VgsvcGstCtrlSessionStartupInfoDestroy(PVBOXSERVICECTRLSESSIONSTARTUPINFO pStartupInfo) 1070 { 1071 if (!pStartupInfo) 1072 return; 1073 1074 RTStrFree(pStartupInfo->pszUser); 1075 RTStrFree(pStartupInfo->pszPassword); 1076 RTStrFree(pStartupInfo->pszDomain); 1077 1078 RT_BZERO(pStartupInfo, sizeof(VBOXSERVICECTRLSESSIONSTARTUPINFO)); 1079 } 1080 1081 /** 1082 * Free's a session startup info. 1083 * 1084 * @param pStartupInfo Session startup info to free. 1085 * The pointer will not be valid anymore after return. 1086 */ 1087 static void vgsvcGstCtrlSessionStartupInfoFree(PVBOXSERVICECTRLSESSIONSTARTUPINFO pStartupInfo) 1088 { 1089 if (!pStartupInfo) 1090 return; 1091 1092 VgsvcGstCtrlSessionStartupInfoDestroy(pStartupInfo); 1093 1094 RTMemFree(pStartupInfo); 1095 pStartupInfo = NULL; 1096 } 1097 1098 /** 1099 * Duplicates a session startup info. 1100 * 1101 * @returns Duplicated session startup info on success, or NULL on error. 1102 * @param pStartupInfo Session startup info to duplicate. 1103 */ 1104 static PVBOXSERVICECTRLSESSIONSTARTUPINFO vgsvcGstCtrlSessionStartupInfoDup(PVBOXSERVICECTRLSESSIONSTARTUPINFO pStartupInfo) 1105 { 1106 AssertPtrReturn(pStartupInfo, NULL); 1107 1108 PVBOXSERVICECTRLSESSIONSTARTUPINFO pStartupInfoDup = (PVBOXSERVICECTRLSESSIONSTARTUPINFO) 1109 RTMemDup(pStartupInfo, sizeof(VBOXSERVICECTRLSESSIONSTARTUPINFO)); 1110 if (pStartupInfoDup) 1111 { 1112 do 1113 { 1114 pStartupInfoDup->pszUser = NULL; 1115 pStartupInfoDup->pszPassword = NULL; 1116 pStartupInfoDup->pszDomain = NULL; 1117 1118 #define DUP_STR(a_Str) \ 1119 if (pStartupInfo->cb##a_Str) \ 1120 { \ 1121 pStartupInfoDup->psz##a_Str = (char *)RTMemDup(pStartupInfo->psz##a_Str, pStartupInfo->cb##a_Str); \ 1122 AssertPtrBreak(pStartupInfoDup->psz##a_Str); \ 1123 pStartupInfoDup->cb##a_Str = pStartupInfo->cb##a_Str; \ 1124 } 1125 DUP_STR(User); 1126 DUP_STR(Password); 1127 DUP_STR(Domain); 1128 1129 #undef DUP_STR 1130 1131 return pStartupInfoDup; 1132 1133 } while (0); /* To use break macros above. */ 1134 1135 vgsvcGstCtrlSessionStartupInfoFree(pStartupInfoDup); 1136 } 1137 1138 return NULL; 1139 } 1028 1140 1029 1141 /** … … 1045 1157 * will contain the actual block size. */ 1046 1158 VBOXSERVICECTRLPROCSTARTUPINFO startupInfo; 1047 RT_ZERO(startupInfo); 1048 startupInfo.cbEnv = sizeof(startupInfo.szEnv); 1049 1050 int rc = VbglR3GuestCtrlProcGetStart(pHostCtx, 1051 /* Command */ 1052 startupInfo.szCmd, sizeof(startupInfo.szCmd), 1053 /* Flags */ 1054 &startupInfo.uFlags, 1055 /* Arguments */ 1056 startupInfo.szArgs, sizeof(startupInfo.szArgs), &startupInfo.uNumArgs, 1057 /* Environment */ 1058 startupInfo.szEnv, &startupInfo.cbEnv, &startupInfo.uNumEnvVars, 1059 /* Credentials; for hosts with VBox < 4.3 (protocol version 1). 1060 * For protocol v2 and up the credentials are part of the session 1061 * opening call. */ 1062 startupInfo.szUser, sizeof(startupInfo.szUser), 1063 startupInfo.szPassword, sizeof(startupInfo.szPassword), 1064 /* Timeout (in ms) */ 1065 &startupInfo.uTimeLimitMS, 1066 /* Process priority */ 1067 &startupInfo.uPriority, 1068 /* Process affinity */ 1069 startupInfo.uAffinity, sizeof(startupInfo.uAffinity), &startupInfo.uNumAffinity); 1159 int rc = VgsvcGstCtrlProcessStartupInfoInit(&startupInfo); 1160 if (RT_FAILURE(rc)) 1161 return rc; 1162 1163 rc = VbglR3GuestCtrlProcGetStart(pHostCtx, 1164 /* Command */ 1165 startupInfo.pszCmd, startupInfo.cbCmd, 1166 /* Flags */ 1167 &startupInfo.fFlags, 1168 /* Arguments */ 1169 startupInfo.pszArgs, startupInfo.cbArgs, &startupInfo.cArgs, 1170 /* Environment */ 1171 startupInfo.pszEnv, &startupInfo.cbEnv, &startupInfo.cEnvVars, 1172 /* Credentials; for hosts with VBox < 4.3 (protocol version 1). 1173 * For protocol v2 and up the credentials are part of the session 1174 * opening call. */ 1175 startupInfo.pszUser, startupInfo.cbUser, 1176 startupInfo.pszPassword, startupInfo.cbPassword, 1177 /* Timeout (in ms) */ 1178 &startupInfo.uTimeLimitMS, 1179 /* Process priority */ 1180 &startupInfo.uPriority, 1181 /* Process affinity */ 1182 startupInfo.uAffinity, sizeof(startupInfo.uAffinity), &startupInfo.uNumAffinity); 1070 1183 if (RT_SUCCESS(rc)) 1071 1184 { 1072 1185 VGSvcVerbose(3, "Request to start process szCmd=%s, fFlags=0x%x, szArgs=%s, szEnv=%s, uTimeout=%RU32\n", 1073 startupInfo. szCmd, startupInfo.uFlags,1074 startupInfo. uNumArgs ? startupInfo.szArgs : "<None>",1075 startupInfo. uNumEnvVars ? startupInfo.szEnv : "<None>",1186 startupInfo.pszCmd, startupInfo.fFlags, 1187 startupInfo.cArgs ? startupInfo.pszArgs : "<None>", 1188 startupInfo.cEnvVars ? startupInfo.pszEnv : "<None>", 1076 1189 startupInfo.uTimeLimitMS); 1077 1190 … … 1103 1216 VbglR3GuestCtrlMsgSkip(pHostCtx->uClientID, rc, UINT32_MAX); 1104 1217 } 1218 1219 VgsvcGstCtrlProcessStartupInfoDestroy(&startupInfo); 1220 1105 1221 return rc; 1106 1222 } … … 1465 1581 AssertPtrReturn(pThread, VERR_INVALID_POINTER); 1466 1582 1467 uint32_t const idSession = pThread-> StartupInfo.uSessionID;1583 uint32_t const idSession = pThread->pStartupInfo->uSessionID; 1468 1584 uint32_t const idClient = g_idControlSvcClient; 1469 1585 VGSvcVerbose(3, "Session ID=%RU32 thread running\n", idSession); … … 1518 1634 /* .idClient = */ idClient, 1519 1635 /* .idContext = */ VBOX_GUESTCTRL_CONTEXTID_MAKE_SESSION(idSession), 1520 /* .uProtocol = */ pThread-> StartupInfo.uProtocol,1636 /* .uProtocol = */ pThread->pStartupInfo->uProtocol, 1521 1637 /* .cParams = */ 2 1522 1638 }; … … 2180 2296 * privileges as the main VBoxService executable. 2181 2297 */ 2182 bool const fAnonymous = pSessionThread->StartupInfo.szUser[0] == '\0'; 2298 bool const fAnonymous = pSessionThread->pStartupInfo->pszUser 2299 && pSessionThread->pStartupInfo->pszUser[0] == '\0'; 2183 2300 if (fAnonymous) 2184 2301 { 2185 Assert(!strlen(pSessionThread-> StartupInfo.szPassword));2186 Assert(!strlen(pSessionThread-> StartupInfo.szDomain));2302 Assert(!strlen(pSessionThread->pStartupInfo->pszPassword)); 2303 Assert(!strlen(pSessionThread->pStartupInfo->pszDomain)); 2187 2304 2188 2305 VGSvcVerbose(3, "New anonymous guest session ID=%RU32 created, fFlags=%x, using protocol %RU32\n", … … 2195 2312 VGSvcVerbose(3, "Spawning new guest session ID=%RU32, szUser=%s, szPassword=%s, szDomain=%s, fFlags=%x, using protocol %RU32\n", 2196 2313 pSessionStartupInfo->uSessionID, 2197 pSessionStartupInfo-> szUser,2314 pSessionStartupInfo->pszUser, 2198 2315 #ifdef DEBUG 2199 pSessionStartupInfo-> szPassword,2316 pSessionStartupInfo->pszPassword, 2200 2317 #else 2201 2318 "XXX", /* Never show passwords in release mode. */ 2202 2319 #endif 2203 pSessionStartupInfo-> szDomain,2320 pSessionStartupInfo->pszDomain, 2204 2321 pSessionStartupInfo->fFlags, 2205 2322 pSessionStartupInfo->uProtocol); … … 2215 2332 2216 2333 char szParmSessionID[32]; 2217 RTStrPrintf(szParmSessionID, sizeof(szParmSessionID), "--session-id=%RU32", pSessionThread-> StartupInfo.uSessionID);2334 RTStrPrintf(szParmSessionID, sizeof(szParmSessionID), "--session-id=%RU32", pSessionThread->pStartupInfo->uSessionID); 2218 2335 2219 2336 char szParmSessionProto[32]; 2220 2337 RTStrPrintf(szParmSessionProto, sizeof(szParmSessionProto), "--session-proto=%RU32", 2221 pSessionThread-> StartupInfo.uProtocol);2338 pSessionThread->pStartupInfo->uProtocol); 2222 2339 #ifdef DEBUG 2223 2340 char szParmThreadId[32]; … … 2237 2354 { 2238 2355 apszArgs[idxArg++] = "--user"; 2239 apszArgs[idxArg++] = pSessionThread-> StartupInfo.szUser;2240 2241 if (strlen(pSessionThread-> StartupInfo.szDomain))2356 apszArgs[idxArg++] = pSessionThread->pStartupInfo->pszUser; 2357 2358 if (strlen(pSessionThread->pStartupInfo->pszDomain)) 2242 2359 { 2243 2360 apszArgs[idxArg++] = "--domain"; 2244 apszArgs[idxArg++] = pSessionThread-> StartupInfo.szDomain;2361 apszArgs[idxArg++] = pSessionThread->pStartupInfo->pszDomain; 2245 2362 } 2246 2363 } … … 2290 2407 #ifndef DEBUG 2291 2408 RTStrPrintf(szParmLogFile, sizeof(szParmLogFile), "%.*s-%RU32-%s-%s%s", 2292 cchBase, g_szLogFile, pSessionStartupInfo->uSessionID, pSessionStartupInfo-> szUser, szTime, pszSuffix);2409 cchBase, g_szLogFile, pSessionStartupInfo->uSessionID, pSessionStartupInfo->pszUser, szTime, pszSuffix); 2293 2410 #else 2294 2411 RTStrPrintf(szParmLogFile, sizeof(szParmLogFile), "%.*s-%RU32-%RU32-%s-%s%s", 2295 2412 cchBase, g_szLogFile, pSessionStartupInfo->uSessionID, uCtrlSessionThread, 2296 pSessionStartupInfo-> szUser, szTime, pszSuffix);2413 pSessionStartupInfo->pszUser, szTime, pszSuffix); 2297 2414 #endif 2298 2415 apszArgs[idxArg++] = "--logfile"; … … 2345 2462 * with the domain name built-in, e.g. "joedoe@example.com". 2346 2463 */ 2347 const char *pszUser = pSessionThread-> StartupInfo.szUser;2464 const char *pszUser = pSessionThread->pStartupInfo->pszUser; 2348 2465 #ifdef RT_OS_WINDOWS 2349 2466 char *pszUserUPN = NULL; 2350 if (pSessionThread-> StartupInfo.szDomain[0])2467 if (pSessionThread->pStartupInfo->pszDomain[0]) 2351 2468 { 2352 2469 int cchbUserUPN = RTStrAPrintf(&pszUserUPN, "%s@%s", 2353 pSessionThread-> StartupInfo.szUser,2354 pSessionThread-> StartupInfo.szDomain);2470 pSessionThread->pStartupInfo->pszUser, 2471 pSessionThread->pStartupInfo->pszDomain); 2355 2472 if (cchbUserUPN > 0) 2356 2473 { … … 2370 2487 &hStdIn, &hStdOutAndErr, &hStdOutAndErr, 2371 2488 !fAnonymous ? pszUser : NULL, 2372 !fAnonymous ? pSessionThread-> StartupInfo.szPassword : NULL,2489 !fAnonymous ? pSessionThread->pStartupInfo->pszPassword : NULL, 2373 2490 NULL /*pvExtraData*/, 2374 2491 &pSessionThread->hProcess); … … 2413 2530 { 2414 2531 AssertMsgReturn( pSessionCur->fStopped == true 2415 || pSessionCur-> StartupInfo.uSessionID != pSessionStartupInfo->uSessionID,2532 || pSessionCur->pStartupInfo->uSessionID != pSessionStartupInfo->uSessionID, 2416 2533 ("Guest session thread ID=%RU32 already exists (fStopped=%RTbool)\n", 2417 pSessionCur-> StartupInfo.uSessionID, pSessionCur->fStopped), VERR_ALREADY_EXISTS);2534 pSessionCur->pStartupInfo->uSessionID, pSessionCur->fStopped), VERR_ALREADY_EXISTS); 2418 2535 } 2419 2536 #endif … … 2436 2553 pSessionThread->hProcess = NIL_RTPROCESS; 2437 2554 2438 /* Copy over session startup info. */ 2439 memcpy(&pSessionThread->StartupInfo, pSessionStartupInfo, sizeof(VBOXSERVICECTRLSESSIONSTARTUPINFO)); 2555 /* Duplicate startup info. */ 2556 pSessionThread->pStartupInfo = vgsvcGstCtrlSessionStartupInfoDup(pSessionStartupInfo); 2557 AssertPtrReturn(pSessionThread->pStartupInfo, VERR_NO_MEMORY); 2440 2558 2441 2559 /* Generate the secret key. */ … … 2482 2600 && !ASMAtomicReadBool(&pSessionThread->fShutdown)) 2483 2601 { 2484 VGSvcVerbose(2, "Thread for session ID=%RU32 started\n", pSessionThread-> StartupInfo.uSessionID);2602 VGSvcVerbose(2, "Thread for session ID=%RU32 started\n", pSessionThread->pStartupInfo->uSessionID); 2485 2603 2486 2604 ASMAtomicXchgBool(&pSessionThread->fStarted, true); … … 2497 2615 */ 2498 2616 VGSvcError("Thread for session ID=%RU32 failed to start, rc=%Rrc\n", 2499 pSessionThread-> StartupInfo.uSessionID, rc);2617 pSessionThread->pStartupInfo->uSessionID, rc); 2500 2618 if (RT_SUCCESS_NP(rc)) 2501 2619 rc = VERR_CANT_CREATE; /** @todo Find a better rc. */ … … 2563 2681 2564 2682 VGSvcVerbose(3, "Waiting for session thread ID=%RU32 to close (%RU32ms) ...\n", 2565 pThread-> StartupInfo.uSessionID, uTimeoutMS);2683 pThread->pStartupInfo->uSessionID, uTimeoutMS); 2566 2684 2567 2685 int rcThread; … … 2570 2688 { 2571 2689 AssertMsg(pThread->fStopped, ("Thread of session ID=%RU32 not in stopped state when it should\n", 2572 pThread-> StartupInfo.uSessionID));2573 2574 VGSvcVerbose(3, "Session thread ID=%RU32 ended with rc=%Rrc\n", pThread-> StartupInfo.uSessionID, rcThread);2690 pThread->pStartupInfo->uSessionID)); 2691 2692 VGSvcVerbose(3, "Session thread ID=%RU32 ended with rc=%Rrc\n", pThread->pStartupInfo->uSessionID, rcThread); 2575 2693 } 2576 2694 else 2577 VGSvcError("Waiting for session thread ID=%RU32 to close failed with rc=%Rrc\n", pThread-> StartupInfo.uSessionID, rc);2695 VGSvcError("Waiting for session thread ID=%RU32 to close failed with rc=%Rrc\n", pThread->pStartupInfo->uSessionID, rc); 2578 2696 } 2579 2697 else 2580 VGSvcVerbose(3, "Thread for session ID=%RU32 not in started state, skipping wait\n", pThread-> StartupInfo.uSessionID);2698 VGSvcVerbose(3, "Thread for session ID=%RU32 not in started state, skipping wait\n", pThread->pStartupInfo->uSessionID); 2581 2699 2582 2700 LogFlowFuncLeaveRC(rc); … … 2595 2713 { 2596 2714 AssertPtrReturn(pThread, VERR_INVALID_POINTER); 2597 2598 const uint32_t uSessionID = pThread->StartupInfo.uSessionID; 2715 AssertPtrReturn(pThread->pStartupInfo, VERR_WRONG_ORDER); 2716 2717 const uint32_t uSessionID = pThread->pStartupInfo->uSessionID; 2599 2718 2600 2719 VGSvcVerbose(3, "Destroying session ID=%RU32 ...\n", uSessionID); … … 2603 2722 if (RT_SUCCESS(rc)) 2604 2723 { 2724 vgsvcGstCtrlSessionStartupInfoFree(pThread->pStartupInfo); 2725 pThread->pStartupInfo = NULL; 2726 2605 2727 /* Remove session from list and destroy object. */ 2606 2728 RTListNodeRemove(&pThread->Node);
Note:
See TracChangeset
for help on using the changeset viewer.

