VirtualBox

Changeset 70214 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Dec 19, 2017 3:24:44 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119798
Message:

VBoxService: Dynamically resolve LsaNtStatusToWinError to make it work on NT 3.50.

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp

    r70196 r70214  
    3535#include <aclapi.h>
    3636#include <tlhelp32.h>
     37#define _NTDEF_
     38#include <Ntsecapi.h>
    3739
    3840#include "VBoxServiceInternal.h"
     
    6668decltype(SetEntriesInAclA)              *g_pfnSetEntriesInAclA;                 /**< NT4+ */
    6769decltype(SetNamedSecurityInfoA)         *g_pfnSetNamedSecurityInfoA;            /**< NT4+ */
     70decltype(LsaNtStatusToWinError)         *g_pfnLsaNtStatusToWinError;            /**< NT3.51+ */
    6871/** @} */
    6972
     
    119122        RESOLVE_SYMBOL(SetEntriesInAclA);
    120123        RESOLVE_SYMBOL(SetNamedSecurityInfoA);
     124        RESOLVE_SYMBOL(LsaNtStatusToWinError);
    121125        RTLdrClose(hLdrMod);
    122126    }
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h

    r70196 r70214  
    223223# endif /* WINSOCK_VERSION */
    224224
     225#ifdef SE_INTERACTIVE_LOGON_NAME
     226extern decltype(LsaNtStatusToWinError)         *g_pfnLsaNtStatusToWinError;
     227#endif
     228
    225229# ifdef VBOX_WITH_GUEST_PROPS
    226230extern int                      VGSvcVMInfoWinWriteUsers(PVBOXSERVICEVEPROPCACHE pCache, char **ppszUserList, uint32_t *pcUsersInList);
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp

    r70196 r70214  
    749749    if (!pSession)
    750750        return false;
    751     if (!g_pfnLsaGetLogonSessionData)
     751    if (   !g_pfnLsaGetLogonSessionData
     752        || !g_pfnLsaNtStatusToWinError)
    752753        return false;
    753754
     
    756757    if (rcNt != STATUS_SUCCESS)
    757758    {
    758         ULONG ulError = LsaNtStatusToWinError(rcNt);
     759        ULONG ulError = g_pfnLsaNtStatusToWinError(rcNt);
    759760        switch (ulError)
    760761        {
     
    10861087    if (RT_FAILURE(rc))
    10871088        return rc;
    1088     if (!g_pfnLsaEnumerateLogonSessions || !g_pfnEnumProcesses)
     1089    if (!g_pfnLsaEnumerateLogonSessions || !g_pfnEnumProcesses || !g_pfnLsaNtStatusToWinError)
    10891090        return VERR_NOT_SUPPORTED;
    10901091
     
    11021103    if (rcNt != STATUS_SUCCESS)
    11031104    {
    1104         ULONG uError = LsaNtStatusToWinError(rcNt);
     1105        ULONG uError = g_pfnLsaNtStatusToWinError(rcNt);
    11051106        switch (uError)
    11061107        {
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