VirtualBox

Changeset 57906 in vbox for trunk/src/VBox/Runtime/win


Ignore:
Timestamp:
Sep 25, 2015 8:43:36 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
102878
Message:

RTProc/win,RTErr: Avoid doing LogonUserW when we don't need to get the profile environment as this may require the TCB privilege. On W2K CreateProcessWithLogonW doesn't plant standard handles in the child process, so try our best to do it ourselves. (This may be applicable to later windows versions too, but behavior must've been change in W10 or earlier.) Introduced specific error codes for the missing process rights to prevent wasting time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/win/RTErrConvertFromWin32.cpp

    r57358 r57906  
    148148
    149149        case ERROR_INVALID_NAME:
     150        case ERROR_BAD_DEVICE:
    150151        case ERROR_BAD_PATHNAME:            return VERR_INVALID_NAME;
    151152
     
    184185        case ERROR_INVALID_EXE_SIGNATURE:   return VERR_INVALID_EXE_SIGNATURE;
    185186        case ERROR_BAD_EXE_FORMAT:          return VERR_BAD_EXE_FORMAT;
     187        case ERROR_FILE_CORRUPT:            return VERR_BAD_EXE_FORMAT;
    186188        case ERROR_RESOURCE_DATA_NOT_FOUND: return VERR_NO_DATA; ///@todo fix ERROR_RESOURCE_DATA_NOT_FOUND translation
    187189        case ERROR_INVALID_ADDRESS:         return VERR_INVALID_POINTER; ///@todo fix ERROR_INVALID_ADDRESS translation - dbghelp returns it on some line number queries.
     
    192194
    193195        case ERROR_LOGON_FAILURE:           return VERR_AUTHENTICATION_FAILURE;
     196        case ERROR_PRIVILEGE_NOT_HELD:      return VERR_PRIVILEGE_NOT_HELD;
     197
     198        case ERROR_PASSWORD_EXPIRED:
     199        case ERROR_ACCOUNT_RESTRICTION:
     200        case ERROR_PASSWORD_RESTRICTION:
     201        case ERROR_ACCOUNT_DISABLED:        return VERR_ACCOUNT_RESTRICTED;
     202
    194203
    195204        /*
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette