Changeset 99120 in vbox
- Timestamp:
- Mar 22, 2023 5:30:14 PM (21 months ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/man_VBoxManage-guestcontrol.xml
r98330 r99120 78 78 <arg>--unquoted-args</arg> 79 79 <arg>--username=<replaceable>username</replaceable></arg> 80 <arg>--cwd=<replaceable>directory</replaceable></arg> 80 81 <arg>--verbose</arg> 81 82 <arg choice="req">-- <replaceable>program/arg0</replaceable> <arg rep="repeat"><replaceable>argument</replaceable></arg></arg> … … 102 103 <arg>--unquoted-args</arg> 103 104 <arg>--username=<replaceable>username</replaceable></arg> 105 <arg>--cwd=<replaceable>directory</replaceable></arg> 104 106 <arg>--verbose</arg> 105 107 <arg choice="req">-- <replaceable>program/arg0</replaceable> <arg rep="repeat"><replaceable>argument</replaceable></arg></arg> … … 502 504 run on the guest VM. For example: 503 505 <filename>C:\Windows\System32\calc.exe</filename>. 506 </para></listitem> 507 </varlistentry> 508 <varlistentry> 509 <term><option>--cwd=<replaceable>path-to-directory</replaceable></option></term> 510 <listitem><para> 511 Specifies the absolute path of a directory in which 512 to start the program. Optional. The directory must 513 exist and be accessible to the guest user. For example: 514 <filename>C:\Users\production\work_area</filename>. 515 </para><para> 516 The short form of this option is <option>-C</option>. 504 517 </para></listitem> 505 518 </varlistentry> -
trunk/include/VBox/GuestHost/GuestControl.h
r99085 r99120 194 194 */ 195 195 #define GUEST_PROC_DEF_CMD_LEN _1K 196 #define GUEST_PROC_DEF_CWD_LEN _1K 196 197 #define GUEST_PROC_DEF_ARGS_LEN _1K 197 198 #define GUEST_PROC_DEF_ENV_LEN _1K … … 205 206 */ 206 207 #define GUEST_PROC_MAX_CMD_LEN _1M 208 #define GUEST_PROC_MAX_CWD_LEN RTPATH_MAX 207 209 #define GUEST_PROC_MAX_ARGS_LEN _2M 208 210 #define GUEST_PROC_MAX_ENV_LEN _4M -
trunk/include/VBox/HostServices/GuestControlSvc.h
r99088 r99120 814 814 * The toolbox commands now are being marked as deprecated. 815 815 * @since 7.1 */ 816 # define VBOX_GUESTCTRL_GF_0_TOOLBOX_AS_CMDS RT_BIT_64(4) 816 #define VBOX_GUESTCTRL_GF_0_TOOLBOX_AS_CMDS RT_BIT_64(4) 817 /** Supports specifying the working directory for run / start. */ 818 #define VBOX_GUESTCTRL_GF_0_PROCESS_CWD RT_BIT_64(5) 817 819 /** Bit that must be set in the 2nd parameter, will be cleared if the host reponds 818 820 * correctly (old hosts might not). */ … … 830 832 * @since 6.1.6 */ 831 833 #define VBOX_GUESTCTRL_HF_0_PROCESS_ARGV0 RT_BIT_64(1) 834 /** Host sends the working directory for run / start, if guest 835 * reports VBOX_GUESTCTRL_GF_0_PROCESS_CWD. 836 * @since 6.1.20 ?? */ 837 #define VBOX_GUESTCTRL_HF_0_PROCESS_CWD RT_BIT_64(2) 832 838 /** @} */ 833 839 … … 1210 1216 /** Pointer to process affinity blocks (uint64_t). */ 1211 1217 HGCMFunctionParameter affinity; 1218 /** Working directory request, filled if guest 1219 * reports VBOX_GUESTCTRL_GF_0_PROCESS_CWD. */ 1220 HGCMFunctionParameter cwd; 1212 1221 } v2; 1213 1222 } u; -
trunk/include/VBox/VBoxGuestLib.h
r99085 r99120 1029 1029 /** Number of environment variables specified in pszEnv. */ 1030 1030 uint32_t cEnvVars; 1031 /** Optional working directory. */ 1032 char *pszCwd; 1033 /** Size (in bytes) of optional working directory string. */ 1034 uint32_t cbCwd; 1031 1035 /** User name (account) to start the process under. */ 1032 1036 char *pszUser; -
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 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r98665 r99120 1170 1170 { 1171 1171 GCTLCMD_COMMON_OPTION_DEFS() 1172 { "--cwd", 'C', RTGETOPT_REQ_STRING }, 1172 1173 { "--putenv", 'E', RTGETOPT_REQ_STRING }, 1173 1174 { "--exe", 'e', RTGETOPT_REQ_STRING }, … … 1200 1201 com::SafeArray<IN_BSTR> aEnv; 1201 1202 const char * pszImage = NULL; 1203 const char * pszCwd = NULL; 1202 1204 bool fWaitForStdOut = fRunCmd; 1203 1205 bool fWaitForStdErr = fRunCmd; … … 1239 1241 case kGstCtrlRunOpt_Profile: 1240 1242 aCreateFlags.push_back(ProcessCreateFlag_Profile); 1243 break; 1244 1245 case 'C': 1246 pszCwd = ValueUnion.psz; 1241 1247 break; 1242 1248 … … 1358 1364 ComPtr<IGuestProcess> pProcess; 1359 1365 CHECK_ERROR_BREAK(pCtx->pGuestSession, ProcessCreate(Bstr(pszImage).raw(), 1366 Bstr(pszCwd).raw(), 1360 1367 ComSafeArrayAsInParam(aArgs), 1361 1368 ComSafeArrayAsInParam(aEnv), -
trunk/src/VBox/HostServices/GuestControl/VBoxGuestControlSvc.cpp
r98665 r99120 952 952 /** Host feature mask for GUEST_MSG_REPORT_FEATURES/GUEST_MSG_QUERY_FEATURES. */ 953 953 static uint64_t const g_fGstCtrlHostFeatures0 = VBOX_GUESTCTRL_HF_0_NOTIFY_RDWR_OFFSET 954 | VBOX_GUESTCTRL_HF_0_PROCESS_CWD 954 955 | VBOX_GUESTCTRL_HF_0_PROCESS_ARGV0; 955 956 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r99085 r99120 14814 14814 <interface 14815 14815 name="IGuestSession" extends="$unknown" 14816 uuid=" 234f0627-866d-48c2-91a5-4c9d50f04928"14816 uuid="5591bead-9c1d-4cbd-9669-2d0b04fac0a8" 14817 14817 wsmap="managed" 14818 14818 reservedMethods="8" reservedAttributes="12" … … 15947 15947 If ProcessCreateFlag_WaitForStdOut and/or ProcessCreateFlag_WaitForStdErr 15948 15948 are set, the guest process will not enter the terminated state until 15949 all data from the specified streams have been read read.15949 all data from the specified streams have been read. 15950 15950 </note> 15951 15951 … … 15961 15961 <desc> 15962 15962 Full path to the file to execute in the guest. The file has to 15963 exist sin the guest VM with executable right to the session user in15963 exist in the guest VM with executable right to the session user in 15964 15964 order to succeed. If empty/null, the first entry in the 15965 15965 @a arguments array will be used instead (i.e. argv[0]). 15966 </desc> 15967 </param> 15968 <param name="cwd" type="wstring" dir="in"> 15969 <desc> 15970 Path to the directory in which to execute in the guest. The 15971 directory has to exist in the guest VM with search rights to the 15972 session user in order to succeed. If empty/null, the session 15973 user's default (typically 'home') directory is used. If not a 15974 full path, it is interpreted relative to the default directory; 15975 e.g. 'work' means '$HOME/work' (according to the guest's '$HOME'- 15976 like concept). 15966 15977 </desc> 15967 15978 </param> … … 16017 16028 See <link to="IGuestSession::processCreate"/> for more information. 16018 16029 </desc> 16030 <param name="cwd" type="wstring" dir="in"> 16031 <desc> 16032 Path to the directory in which to execute in the guest. The 16033 directory has to exist in the guest VM with search rights to the 16034 session user in order to succeed. If empty/null, the session 16035 user's default (typically 'home') directory is used. If not a 16036 full path, it is interpreted relative to the default directory; 16037 e.g. 'work' means '$HOME/work' (according to the guest's '$HOME'- 16038 like concept). 16039 </desc> 16040 </param> 16019 16041 <param name="executable" type="wstring" dir="in"> 16020 16042 <desc> 16021 16043 Full path to the file to execute in the guest. The file has to 16022 exist sin the guest VM with executable right to the session user in16044 exist in the guest VM with executable right to the session user in 16023 16045 order to succeed. If empty/null, the first entry in the 16024 16046 @a arguments array will be used instead (i.e. argv[0]). -
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r99085 r99120 945 945 /** The executable. */ 946 946 Utf8Str mExecutable; 947 /** The working directory. Optional, can be empty if not used. */ 948 Utf8Str mCwd; 947 949 /** Arguments vector (starting with argument \#0). */ 948 950 ProcessArguments mArguments; -
trunk/src/VBox/Main/include/GuestSessionImpl.h
r98713 r99120 212 212 ULONG aMode); 213 213 HRESULT processCreate(const com::Utf8Str &aCommand, 214 const com::Utf8Str &aCwd, 214 215 const std::vector<com::Utf8Str> &aArguments, 215 216 const std::vector<com::Utf8Str> &aEnvironment, … … 218 219 ComPtr<IGuestProcess> &aGuestProcess); 219 220 HRESULT processCreateEx(const com::Utf8Str &aCommand, 221 const com::Utf8Str &aCwd, 220 222 const std::vector<com::Utf8Str> &aArguments, 221 223 const std::vector<com::Utf8Str> &aEnvironment, -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r98666 r99120 1158 1158 int GuestProcess::i_startProcess(uint32_t cMsTimeout, int *pvrcGuest) 1159 1159 { 1160 LogFlowThisFunc(("cMsTimeout=%RU32, procExe=%s, procTimeoutMS=%RU32, procFlags=%x, sessionID=%RU32\n",1161 cMsTimeout, mData.mProcess.mExecutable.c_str(), mData.mProcess.m TimeoutMS, mData.mProcess.mFlags,1162 m Session->i_getId()));1160 LogFlowThisFunc(("cMsTimeout=%RU32, procExe=%s, cwd=%s, procTimeoutMS=%RU32, procFlags=%x, sessionID=%RU32\n", 1161 cMsTimeout, mData.mProcess.mExecutable.c_str(), mData.mProcess.mCwd.c_str(), 1162 mData.mProcess.mTimeoutMS, mData.mProcess.mFlags, mSession->i_getId())); 1163 1163 1164 1164 /* Wait until the caller function (if kicked off by a thread) … … 1215 1215 return VERR_BUFFER_OVERFLOW; 1216 1216 1217 Guest *pGuest = mSession->i_getParent(); 1218 AssertPtr(pGuest); 1219 const uint64_t fGuestControlFeatures0 = pGuest->i_getGuestControlFeatures0(); 1220 1221 /* Check if the Guest Additions support setting the current working directory for the new process 1222 * if the caller wants to set one, and bail out early if it doesn't. */ 1223 if ( !mData.mProcess.mCwd.isEmpty() 1224 && ( uProtocol < 2 1225 || !(fGuestControlFeatures0 & VBOX_GUESTCTRL_GF_0_PROCESS_CWD))) 1226 { 1227 LogRel2(("Guest Control: Installed Guest Addtions don't support setting the current working directory to '%s'!\n", 1228 mData.mProcess.mCwd.c_str())); 1229 return VERR_NOT_SUPPORTED; 1230 } 1231 1217 1232 size_t cbArgs = 0; 1218 1233 char *pszArgs = NULL; 1219 1234 int vrc = VINF_SUCCESS; 1235 1220 1236 if (cArgs) 1221 1237 { … … 1229 1245 } 1230 1246 papszArgv[cArgs] = NULL; 1231 1232 Guest *pGuest = mSession->i_getParent();1233 AssertPtr(pGuest);1234 1235 const uint64_t fGuestControlFeatures0 = pGuest->i_getGuestControlFeatures0();1236 1247 1237 1248 /* If the Guest Additions don't support using argv[0] correctly (< 6.1.x), don't supply it. */ … … 1299 1310 /* The actual CPU affinity blocks. */ 1300 1311 HGCMSvcSetPv(&paParms[i++], (void *)&mData.mProcess.mAffinity, sizeof(mData.mProcess.mAffinity)); 1312 /* Supply working directory, if guest supports it. */ 1313 if (fGuestControlFeatures0 & VBOX_GUESTCTRL_GF_0_PROCESS_CWD) 1314 HGCMSvcSetRTCStr(&paParms[i++], mData.mProcess.mCwd); 1301 1315 } 1302 1316 -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r98813 r99120 4943 4943 4944 4944 4945 HRESULT GuestSession::processCreate(const com::Utf8Str &aExecutable, const std::vector<com::Utf8Str> &aArguments, 4945 HRESULT GuestSession::processCreate(const com::Utf8Str &aExecutable, const com::Utf8Str &aCwd, 4946 const std::vector<com::Utf8Str> &aArguments, 4946 4947 const std::vector<com::Utf8Str> &aEnvironment, 4947 4948 const std::vector<ProcessCreateFlag_T> &aFlags, … … 4951 4952 4952 4953 std::vector<LONG> affinityIgnored; 4953 return processCreateEx(aExecutable, aArguments, aEnvironment, aFlags, aTimeoutMS, ProcessPriority_Default, 4954 affinityIgnored, aGuestProcess); 4955 } 4956 4957 HRESULT GuestSession::processCreateEx(const com::Utf8Str &aExecutable, const std::vector<com::Utf8Str> &aArguments, 4954 return processCreateEx(aExecutable, aCwd, aArguments, aEnvironment, aFlags, aTimeoutMS, 4955 ProcessPriority_Default, affinityIgnored, aGuestProcess); 4956 } 4957 4958 HRESULT GuestSession::processCreateEx(const com::Utf8Str &aExecutable, const com::Utf8Str &aCwd, 4959 const std::vector<com::Utf8Str> &aArguments, 4958 4960 const std::vector<com::Utf8Str> &aEnvironment, 4959 4961 const std::vector<ProcessCreateFlag_T> &aFlags, ULONG aTimeoutMS, … … 4978 4980 } 4979 4981 4982 uint32_t const uProtocol = i_getProtocolVersion(); 4983 uint64_t const fGuestControlFeatures0 = mParent->i_getGuestControlFeatures0(); 4984 4985 /* If a current working directory (CWD) is set, make sure that the installed Guest Additions actually 4986 * support this before doing anything else. */ 4987 if ( !aCwd.isEmpty() 4988 && ( uProtocol < 2 4989 || !(fGuestControlFeatures0 & VBOX_GUESTCTRL_GF_0_PROCESS_CWD))) 4990 return setError(VBOX_E_NOT_SUPPORTED, 4991 tr("Setting the current working directory is not supported by the installed Guest Addtions!")); 4992 4980 4993 /* The rest of the input is being validated in i_processCreateEx(). */ 4981 4994 … … 4996 5009 else /* If no arguments were given, add the executable as argv[0] by default. */ 4997 5010 procInfo.mArguments.push_back(procInfo.mExecutable); 5011 5012 /* Optional working directory */ 5013 procInfo.mCwd = aCwd; 4998 5014 4999 5015 /* Combine the environment changes associated with the ones passed in by
Note:
See TracChangeset
for help on using the changeset viewer.