- Timestamp:
- May 26, 2010 10:13:20 AM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
r29762 r29807 823 823 rc = RTProcCreateEx(pData->pszCmd, pData->papszArgs, hEnv, RTPROC_FLAGS_SERVICE, 824 824 phStdIn, phStdOut, phStdErr, 825 strlen(pData->pszUser) ? pData->pszUser : NULL, 826 strlen(pData->pszUser) && strlen(pData->pszPassword) ? pData->pszPassword : NULL, 825 pData->pszUser, pData->pszPassword, 827 826 &hProcess); 828 827 if (RT_SUCCESS(rc)) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r29786 r29807 322 322 if (FAILED(rc)) 323 323 { 324 /* If we got a VBOX_E_IPRT error we handle the error in a more gentle way 325 * because it contains more accurate info about what went wrong. */ 324 326 ErrorInfo info(guest); 325 327 if (info.isFullAvailable()) 326 RTPrintf("ERROR: %ls (%Rhrc).\n", info.getText().raw(), info.getResultCode()); 328 { 329 if (rc == VBOX_E_IPRT_ERROR) 330 { 331 RTPrintf("%ls.\n", info.getText().raw()); 332 } 333 else 334 { 335 RTPrintf("ERROR: %ls (%Rhrc).\n", info.getText().raw(), info.getResultCode()); 336 } 337 } 327 338 break; 328 339 } -
trunk/src/VBox/Main/GuestImpl.cpp
r29785 r29807 1060 1060 tr("The guest did not respond within time (%ums)"), aTimeoutMS); 1061 1061 } 1062 else if (vrc == VERR_INVALID_PARAMETER)1063 {1064 rc = setError(VBOX_E_IPRT_ERROR,1065 tr("The guest reported an unknown process status (%u)"), pData->u32Status);1066 }1067 1062 else if (vrc == VERR_PERMISSION_DENIED) 1068 1063 { … … 1072 1067 else 1073 1068 { 1074 rc = setError(E_UNEXPECTED, 1075 tr("The service call failed with error %Rrc"), vrc); 1069 if (pData->u32Status == PROC_STS_ERROR) 1070 rc = setError(VBOX_E_IPRT_ERROR, 1071 tr("Process could not be started: %Rrc"), pData->u32Flags); 1072 else 1073 rc = setError(E_UNEXPECTED, 1074 tr("The service call failed with error %Rrc"), vrc); 1076 1075 } 1077 1076 } -
trunk/src/VBox/Runtime/r3/win/process-win.cpp
r29728 r29807 287 287 (LPVOID)pTokenUser, 288 288 dwSize, 289 &dwSize) 290 && IsValidSid(pTokenUser->User.Sid) 291 && EqualSid(pTokenUser->User.Sid, pSID)) 289 &dwSize)) 292 290 { 293 if ( DuplicateTokenEx(hTokenProc, MAXIMUM_ALLOWED,294 NULL, SecurityIdentification, TokenPrimary, phToken))291 if ( IsValidSid(pTokenUser->User.Sid) 292 && EqualSid(pTokenUser->User.Sid, pSID)) 295 293 { 296 /* 297 * So we found the process instance which belongs to the user we want to 298 * to run our new process under. This duplicated token will be used for 299 * the actual CreateProcessAsUserW() call then. 300 */ 301 fFound = TRUE; 294 if (DuplicateTokenEx(hTokenProc, MAXIMUM_ALLOWED, 295 NULL, SecurityIdentification, TokenPrimary, phToken)) 296 { 297 /* 298 * So we found the process instance which belongs to the user we want to 299 * to run our new process under. This duplicated token will be used for 300 * the actual CreateProcessAsUserW() call then. 301 */ 302 fFound = TRUE; 303 } 304 else 305 dwErr = GetLastError(); 302 306 } 303 else304 dwErr = GetLastError();305 307 } 306 308 else … … 320 322 if (fFound) 321 323 return VINF_SUCCESS; 322 return RTErrConvertFromWin32(dwErr); 324 if (dwErr != NO_ERROR) 325 return RTErrConvertFromWin32(dwErr); 326 return VERR_NOT_FOUND; /* No error occured, but we didn't find the right process. */ 323 327 } 324 328 … … 649 653 break; 650 654 651 case ERROR_PASSWORD_EXPIRED: 652 case ERROR_ACCOUNT_RESTRICTION: 655 case ERROR_PASSWORD_EXPIRED: 656 case ERROR_ACCOUNT_RESTRICTION: /* See: http://support.microsoft.com/kb/303846/ */ 653 657 rc = VERR_LOGON_FAILURE; 654 658 break;
Note:
See TracChangeset
for help on using the changeset viewer.