vbox的更動 99120 路徑 trunk/src/VBox/Additions/common
- 時間撮記:
- 2023-3-22 下午05:30:14 (20 月 以前)
- 位置:
- trunk/src/VBox/Additions/common
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp
r99088 r99120 1391 1391 * @param pStartupInfo Process startup info to initializes. 1392 1392 * @param cbCmd Size (in bytes) to use for the command buffer. 1393 * @param cbCwd Size (in bytes) to use for the current working directory. 1393 1394 * @param cbUser Size (in bytes) to use for the user name buffer. 1394 1395 * @param cbPassword Size (in bytes) to use for the password buffer. … … 1399 1400 VBGLR3DECL(int) VbglR3GuestCtrlProcStartupInfoInitEx(PVBGLR3GUESTCTRLPROCSTARTUPINFO pStartupInfo, 1400 1401 size_t cbCmd, 1402 size_t cbCwd, 1401 1403 size_t cbUser, size_t cbPassword, size_t cbDomain, 1402 1404 size_t cbArgs, size_t cbEnv) … … 1404 1406 AssertPtrReturn(pStartupInfo, VERR_INVALID_POINTER); 1405 1407 AssertReturn(cbCmd, VERR_INVALID_PARAMETER); 1408 AssertReturn(cbCwd, VERR_INVALID_PARAMETER); 1406 1409 AssertReturn(cbUser, VERR_INVALID_PARAMETER); 1407 1410 AssertReturn(cbPassword, VERR_INVALID_PARAMETER); … … 1423 1426 { 1424 1427 ALLOC_STR(Cmd, cbCmd); 1428 ALLOC_STR(Cwd, cbCwd); 1425 1429 ALLOC_STR(Args, cbArgs); 1426 1430 ALLOC_STR(Env, cbEnv); … … 1448 1452 return VbglR3GuestCtrlProcStartupInfoInitEx(pStartupInfo, 1449 1453 GUEST_PROC_DEF_CMD_LEN, 1454 GUEST_PROC_DEF_CWD_LEN, 1450 1455 GUEST_PROC_DEF_USER_LEN /* Deprecated, now handled via session creation. */, 1451 1456 GUEST_PROC_DEF_PASSWORD_LEN /* Ditto. */, … … 1465 1470 1466 1471 RTStrFree(pStartupInfo->pszCmd); 1472 RTStrFree(pStartupInfo->pszCwd); 1467 1473 RTStrFree(pStartupInfo->pszArgs); 1468 1474 RTStrFree(pStartupInfo->pszEnv); … … 1605 1611 VbglHGCMParmUInt32Set(&Msg.u.v2.num_affinity, 0); 1606 1612 VbglHGCMParmPtrSet(&Msg.u.v2.affinity, pStartupInfo->uAffinity, sizeof(pStartupInfo->uAffinity)); 1613 /* v2.cwd was added in 7.1. If the host is older, the Msg struct it sends is 1614 * shorter and these fields are zero-filled, which equals 'no cwd requested'. */ 1615 VbglHGCMParmPtrSet(&Msg.u.v2.cwd, pStartupInfo->pszCwd, pStartupInfo->cbCwd); 1607 1616 } 1608 1617 … … 1610 1619 if (RT_FAILURE(rc)) 1611 1620 { 1612 LogRel(("VbglR3GuestCtrlProcGetStart: 1 - %Rrc (retry %u, cbCmd=%RU32, cb Args=%RU32, cbEnv=%RU32)\n",1613 rc, cRetries, pStartupInfo->cbCmd, pStartupInfo->cb Args, pStartupInfo->cbEnv));1621 LogRel(("VbglR3GuestCtrlProcGetStart: 1 - %Rrc (retry %u, cbCmd=%RU32, cbCwd=%RU32, cbArgs=%RU32, cbEnv=%RU32)\n", 1622 rc, cRetries, pStartupInfo->cbCmd, pStartupInfo->cbCwd, pStartupInfo->cbArgs, pStartupInfo->cbEnv)); 1614 1623 1615 1624 if ( rc == VERR_BUFFER_OVERFLOW … … 1624 1633 /* We can't tell which parameter doesn't fit, so we have to resize all. */ 1625 1634 GROW_STR(Cmd , GUEST_PROC_MAX_CMD_LEN); 1635 GROW_STR(Cwd, GUEST_PROC_MAX_CWD_LEN); 1626 1636 GROW_STR(Args, GUEST_PROC_MAX_ARGS_LEN); 1627 1637 GROW_STR(Env, GUEST_PROC_MAX_ENV_LEN); 1628 1638 1629 1639 #undef GROW_STR 1630 LogRel(("VbglR3GuestCtrlProcGetStart: 2 - %Rrc (retry %u, cbCmd=%RU32, cb Args=%RU32, cbEnv=%RU32)\n",1631 rc, cRetries, pStartupInfo->cbCmd, pStartupInfo->cb Args, pStartupInfo->cbEnv));1640 LogRel(("VbglR3GuestCtrlProcGetStart: 2 - %Rrc (retry %u, cbCmd=%RU32, cbCwd=%RU32, cbArgs=%RU32, cbEnv=%RU32)\n", 1641 rc, cRetries, pStartupInfo->cbCmd, pStartupInfo->cbCwd, pStartupInfo->cbArgs, pStartupInfo->cbEnv)); 1632 1642 LogRel(("g_fVbglR3GuestCtrlHavePeekGetCancel=%RTbool\n", RT_BOOL(g_fVbglR3GuestCtrlHavePeekGetCancel))); 1633 1643 } -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
r98526 r99120 258 258 | VBOX_GUESTCTRL_GF_0_PROCESS_ARGV0 259 259 | VBOX_GUESTCTRL_GF_0_PROCESS_DYNAMIC_SIZES 260 | VBOX_GUESTCTRL_GF_0_PROCESS_CWD 260 261 #ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS 261 262 | VBOX_GUESTCTRL_GF_0_TOOLBOX_AS_CMDS -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
r98103 r99120 1254 1254 * @param pszPassword Password of the specified user. 1255 1255 * @param pszDomain Domain to use for authentication. 1256 * @param pszCwd Current working directory to use for the created process. 1257 * Set to NULL if not being used. 1256 1258 * @param phProcess Pointer which will receive the process handle after 1257 1259 * successful process start. … … 1260 1262 PCRTHANDLE phStdIn, PCRTHANDLE phStdOut, PCRTHANDLE phStdErr, 1261 1263 const char *pszAsUser, const char *pszPassword, const char *pszDomain, 1262 PRTPROCESS phProcess)1264 const char *pszCwd, PRTPROCESS phProcess) 1263 1265 { 1264 1266 #ifndef RT_OS_WINDOWS … … 1272 1274 /* pszPassword is optional. */ 1273 1275 /* pszDomain is optional. */ 1276 /* pszCwd is optional. */ 1274 1277 AssertPtrReturn(phProcess, VERR_INVALID_PARAMETER); 1275 1278 … … 1411 1414 fProcCreateFlags |= RTPROC_FLAGS_UNQUOTED_ARGS; 1412 1415 } 1416 if (pszCwd && *pszCwd) 1417 fProcCreateFlags |= RTPROC_FLAGS_CWD; 1418 else 1419 pszCwd = NULL; 1413 1420 1414 1421 /* If no user name specified run with current credentials (e.g. … … 1447 1454 pszAsUser, 1448 1455 pszPassword && *pszPassword ? pszPassword : NULL, 1449 NULL/*pvExtraData*/,1456 (void *)pszCwd /*pvExtraData*/, 1450 1457 phProcess); 1451 1458 … … 1545 1552 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: fHostFeatures0 = %#x\n", g_fControlHostFeatures0); 1546 1553 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.szCmd = '%s'\n", pProcess->pStartupInfo->pszCmd); 1554 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.szCwd = '%s'\n", pProcess->pStartupInfo->pszCwd 1555 ? pProcess->pStartupInfo->pszCwd : "<None>"); 1547 1556 VGSvcVerbose(3, "vgsvcGstCtrlProcessProcessWorker: StartupInfo.uNumArgs = '%RU32'\n", pProcess->pStartupInfo->cArgs); 1548 1557 #ifdef DEBUG /* Never log this stuff in release mode! */ … … 1678 1687 fNeedsImpersonation ? pProcess->pStartupInfo->pszPassword : NULL, 1679 1688 fNeedsImpersonation ? pProcess->pStartupInfo->pszDomain : NULL, 1680 &pProcess->hProcess);1689 pProcess->pStartupInfo->pszCwd, &pProcess->hProcess); 1681 1690 if (RT_FAILURE(rc)) 1682 1691 VGSvcError("Error starting process, rc=%Rrc\n", rc); -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r99087 r99120 1692 1692 if (RT_SUCCESS(rc)) 1693 1693 { 1694 VGSvcVerbose(3, "Request to start process szCmd=%s, fFlags=0x%x, szArgs=%s, szEnv=%s, uTimeout=%RU32\n",1694 VGSvcVerbose(3, "Request to start process szCmd=%s, fFlags=0x%x, szArgs=%s, szEnv=%s, szCwd=%s, uTimeout=%RU32\n", 1695 1695 pStartupInfo->pszCmd, pStartupInfo->fFlags, 1696 1696 pStartupInfo->cArgs ? pStartupInfo->pszArgs : "<None>", 1697 1697 pStartupInfo->cEnvVars ? pStartupInfo->pszEnv : "<None>", 1698 pStartupInfo->cbCwd ? pStartupInfo->pszCwd : "<None>", 1698 1699 pStartupInfo->uTimeLimitMS); 1699 1700
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器