Changeset 99169 in vbox for trunk/src/VBox/Additions/common/VBoxGuest
- Timestamp:
- Mar 24, 2023 9:44:55 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp
r99146 r99169 1391 1391 * @param pStartupInfo Process startup info to initializes. 1392 1392 * @param cbCmd Size (in bytes) to use for the command buffer. 1393 * @param cbArgs Size (in bytes) to use for the arguments buffer. 1394 * @param cbEnv Size (in bytes) to use for the environment buffer. 1393 1395 * @param cbCwd Size (in bytes) to use for the current working directory. 1394 1396 * @param cbUser Size (in bytes) to use for the user name buffer. 1395 1397 * @param cbPassword Size (in bytes) to use for the password buffer. 1396 1398 * @param cbDomain Size (in bytes) to use for the domain buffer. 1397 * @param cbArgs Size (in bytes) to use for the arguments buffer.1398 * @param cbEnv Size (in bytes) to use for the environment buffer.1399 1399 */ 1400 1400 VBGLR3DECL(int) VbglR3GuestCtrlProcStartupInfoInitEx(PVBGLR3GUESTCTRLPROCSTARTUPINFO pStartupInfo, 1401 size_t cbCmd, 1401 size_t cbCmd, size_t cbArgs, size_t cbEnv, 1402 1402 size_t cbCwd, 1403 size_t cbUser, size_t cbPassword, size_t cbDomain, 1404 size_t cbArgs, size_t cbEnv) 1403 size_t cbUser, size_t cbPassword, size_t cbDomain) 1405 1404 { 1406 1405 AssertPtrReturn(pStartupInfo, VERR_INVALID_POINTER); 1407 1406 AssertReturn(cbCmd, VERR_INVALID_PARAMETER); 1407 AssertReturn(cbArgs, VERR_INVALID_PARAMETER); 1408 AssertReturn(cbEnv, VERR_INVALID_PARAMETER); 1408 1409 AssertReturn(cbCwd, VERR_INVALID_PARAMETER); 1409 1410 AssertReturn(cbUser, VERR_INVALID_PARAMETER); 1410 1411 AssertReturn(cbPassword, VERR_INVALID_PARAMETER); 1411 1412 AssertReturn(cbDomain, VERR_INVALID_PARAMETER); 1412 AssertReturn(cbArgs, VERR_INVALID_PARAMETER);1413 AssertReturn(cbEnv, VERR_INVALID_PARAMETER);1414 1413 1415 1414 RT_BZERO(pStartupInfo, sizeof(VBGLR3GUESTCTRLPROCSTARTUPINFO)); … … 1426 1425 { 1427 1426 ALLOC_STR(Cmd, cbCmd); 1428 ALLOC_STR(Cwd, cbCwd);1429 1427 ALLOC_STR(Args, cbArgs); 1430 1428 ALLOC_STR(Env, cbEnv); 1429 ALLOC_STR(Cwd, cbCwd); 1431 1430 ALLOC_STR(User, cbUser); 1432 1431 ALLOC_STR(Password, cbPassword); … … 1446 1445 * Initializes a process startup info with default values. 1447 1446 * 1448 * @param pStartupInfo Process startup info to initialize s.1447 * @param pStartupInfo Process startup info to initialize. 1449 1448 */ 1450 1449 VBGLR3DECL(int) VbglR3GuestCtrlProcStartupInfoInit(PVBGLR3GUESTCTRLPROCSTARTUPINFO pStartupInfo) 1451 1450 { 1452 1451 return VbglR3GuestCtrlProcStartupInfoInitEx(pStartupInfo, 1453 GUEST_PROC_DEF_CMD_LEN, 1452 GUEST_PROC_DEF_CMD_LEN, GUEST_PROC_DEF_ARGS_LEN, GUEST_PROC_DEF_ENV_LEN, 1454 1453 GUEST_PROC_DEF_CWD_LEN, 1455 1454 GUEST_PROC_DEF_USER_LEN /* Deprecated, now handled via session creation. */, 1456 1455 GUEST_PROC_DEF_PASSWORD_LEN /* Ditto. */, 1457 GUEST_PROC_DEF_DOMAIN_LEN /* Ditto. */, 1458 GUEST_PROC_DEF_ARGS_LEN, GUEST_PROC_DEF_ENV_LEN); 1456 GUEST_PROC_DEF_DOMAIN_LEN /* Ditto. */); 1459 1457 } 1460 1458 … … 1470 1468 1471 1469 RTStrFree(pStartupInfo->pszCmd); 1472 RTStrFree(pStartupInfo->pszCwd);1473 1470 RTStrFree(pStartupInfo->pszArgs); 1474 1471 RTStrFree(pStartupInfo->pszEnv); 1472 RTStrFree(pStartupInfo->pszCwd); 1475 1473 RTStrFree(pStartupInfo->pszUser); 1476 1474 RTStrFree(pStartupInfo->pszPassword); … … 1516 1514 pStartupInfoDup->pszArgs = NULL; 1517 1515 pStartupInfoDup->pszEnv = NULL; 1516 pStartupInfoDup->pszCwd = NULL; 1518 1517 pStartupInfoDup->pszUser = NULL; 1519 1518 pStartupInfoDup->pszPassword = NULL; … … 1539 1538 DUP_MEM(Args); 1540 1539 DUP_MEM(Env); 1540 DUP_MEM(Cwd); 1541 1541 DUP_STR(User); 1542 1542 DUP_STR(Password); … … 1633 1633 /* We can't tell which parameter doesn't fit, so we have to resize all. */ 1634 1634 GROW_STR(Cmd , GUEST_PROC_MAX_CMD_LEN); 1635 GROW_STR(Cwd, GUEST_PROC_MAX_CWD_LEN);1636 1635 GROW_STR(Args, GUEST_PROC_MAX_ARGS_LEN); 1637 1636 GROW_STR(Env, GUEST_PROC_MAX_ENV_LEN); 1638 1637 GROW_STR(Cwd, GUEST_PROC_MAX_CWD_LEN); 1639 1638 #undef GROW_STR 1640 1639 LogRel(("VbglR3GuestCtrlProcGetStart: 2 - %Rrc (retry %u, cbCmd=%RU32, cbCwd=%RU32, cbArgs=%RU32, cbEnv=%RU32)\n",
Note:
See TracChangeset
for help on using the changeset viewer.