Changeset 29807 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- May 26, 2010 10:13:20 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62016
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.