Changeset 38270 in vbox for trunk/src/VBox
- Timestamp:
- Aug 1, 2011 5:47:53 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r38269 r38270 1094 1094 STDMETHODIMP Guest::ExecuteProcess(IN_BSTR aCommand, ULONG aFlags, 1095 1095 ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 1096 IN_BSTR Username, IN_BSTR aPassword,1096 IN_BSTR aUsername, IN_BSTR aPassword, 1097 1097 ULONG aTimeoutMS, ULONG *aPID, IProgress **aProgress) 1098 1098 { … … 1109 1109 1110 1110 /* Do not allow anonymous executions (with system rights). */ 1111 if (RT_UNLIKELY(( Username) == NULL || *(Username) == '\0'))1111 if (RT_UNLIKELY((aUsername) == NULL || *(aUsername) == '\0')) 1112 1112 return setError(E_INVALIDARG, tr("No user name specified")); 1113 1113 1114 1114 LogRel(("Executing guest process \"%s\" as user \"%s\" ...\n", 1115 Utf8Str(aCommand).c_str(), Utf8Str( Username).c_str()));1115 Utf8Str(aCommand).c_str(), Utf8Str(aUsername).c_str())); 1116 1116 1117 1117 return executeProcessInternal(aCommand, aFlags, ComSafeArrayInArg(aArguments), 1118 1118 ComSafeArrayInArg(aEnvironment), 1119 Username, aPassword, aTimeoutMS, aPID, aProgress, NULL /* rc */);1119 aUsername, aPassword, aTimeoutMS, aPID, aProgress, NULL /* rc */); 1120 1120 #endif 1121 1121 } … … 1124 1124 /** 1125 1125 * Executes and waits for an internal tool (that is, a tool which is integrated into 1126 * VBoxService, beginning with "vbox_" (e.g. "vbox_ls")) .1126 * VBoxService, beginning with "vbox_" (e.g. "vbox_ls")) to finish its operation. 1127 1127 * 1128 1128 * @return HRESULT … … 1130 1130 * @param aDescription Friendly description of the operation. 1131 1131 * @param aFlags Execution flags. 1132 * @param Username Username to execute tool under.1132 * @param aUsername Username to execute tool under. 1133 1133 * @param aPassword The user's password. 1134 1134 * @param aProgress Pointer which receives the tool's progress object. Optional. … … 1137 1137 HRESULT Guest::executeAndWaitForTool(IN_BSTR aTool, IN_BSTR aDescription, 1138 1138 ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 1139 IN_BSTR Username, IN_BSTR aPassword,1139 IN_BSTR aUsername, IN_BSTR aPassword, 1140 1140 IProgress **aProgress, ULONG *aPID) 1141 1141 { … … 1143 1143 ULONG uPID; 1144 1144 1145 HRESULT rc = ExecuteProcess(aTool, 1146 ExecuteProcessFlag_Hidden, 1147 aArguments, aEnvironment, 1148 Username, aPassword, 1149 5 * 1000 /* Wait 5s for getting the process started. */, 1150 &uPID, progressTool.asOutParam()); 1145 HRESULT rc = this->ExecuteProcess(aTool, 1146 ExecuteProcessFlag_Hidden, 1147 ComSafeArrayInArg(aArguments), 1148 ComSafeArrayInArg(aEnvironment), 1149 aUsername, aPassword, 1150 5 * 1000 /* Wait 5s for getting the process started. */, 1151 &uPID, progressTool.asOutParam()); 1151 1152 if (SUCCEEDED(rc)) 1152 1153 { … … 1261 1262 HRESULT Guest::executeProcessInternal(IN_BSTR aCommand, ULONG aFlags, 1262 1263 ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 1263 IN_BSTR Username, IN_BSTR aPassword,1264 IN_BSTR aUsername, IN_BSTR aPassword, 1264 1265 ULONG aTimeoutMS, ULONG *aPID, IProgress **aProgress, int *pRC) 1265 1266 { … … 1335 1336 } 1336 1337 1337 Utf8Str Utf8UserName( Username);1338 Utf8Str Utf8UserName(aUsername); 1338 1339 Utf8Str Utf8Password(aPassword); 1339 1340 if (RT_SUCCESS(vrc)) … … 1915 1916 1916 1917 STDMETHODIMP Guest::CopyFromGuest(IN_BSTR aSource, IN_BSTR aDest, 1917 IN_BSTR Username, IN_BSTR aPassword,1918 IN_BSTR aUsername, IN_BSTR aPassword, 1918 1919 ULONG aFlags, IProgress **aProgress) 1919 1920 { … … 1923 1924 CheckComArgStrNotEmptyOrNull(aSource); 1924 1925 CheckComArgStrNotEmptyOrNull(aDest); 1925 CheckComArgStrNotEmptyOrNull( Username);1926 CheckComArgStrNotEmptyOrNull(aUsername); 1926 1927 CheckComArgStrNotEmptyOrNull(aPassword); 1927 1928 CheckComArgOutPointerValid(aProgress); … … 1965 1966 task->strSource = (Utf8Str(aSource)); 1966 1967 task->strDest = (Utf8Str(aDest)); 1967 task->strUserName = (Utf8Str( Username));1968 task->strUserName = (Utf8Str(aUsername)); 1968 1969 task->strPassword = (Utf8Str(aPassword)); 1969 1970 task->uFlags = aFlags; … … 1990 1991 1991 1992 STDMETHODIMP Guest::CopyToGuest(IN_BSTR aSource, IN_BSTR aDest, 1992 IN_BSTR Username, IN_BSTR aPassword,1993 IN_BSTR aUsername, IN_BSTR aPassword, 1993 1994 ULONG aFlags, IProgress **aProgress) 1994 1995 { … … 1998 1999 CheckComArgStrNotEmptyOrNull(aSource); 1999 2000 CheckComArgStrNotEmptyOrNull(aDest); 2000 CheckComArgStrNotEmptyOrNull( Username);2001 CheckComArgStrNotEmptyOrNull(aUsername); 2001 2002 CheckComArgStrNotEmptyOrNull(aPassword); 2002 2003 CheckComArgOutPointerValid(aProgress); … … 2040 2041 task->strSource = (Utf8Str(aSource)); 2041 2042 task->strDest = (Utf8Str(aDest)); 2042 task->strUserName = (Utf8Str( Username));2043 task->strUserName = (Utf8Str(aUsername)); 2043 2044 task->strPassword = (Utf8Str(aPassword)); 2044 2045 task->uFlags = aFlags;
Note:
See TracChangeset
for help on using the changeset viewer.