VirtualBox

Changeset 34558 in vbox for trunk/src/VBox/Main/webservice


Ignore:
Timestamp:
Dec 1, 2010 10:56:44 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
68349
Message:

Updated VBox authentication library interface, removed references to VRDP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/vboxweb.cpp

    r33540 r34558  
    11311131
    11321132    static bool fAuthLibLoaded = false;
    1133     static PVRDPAUTHENTRY pfnAuthEntry = NULL;
    1134     static PVRDPAUTHENTRY2 pfnAuthEntry2 = NULL;
     1133    static PAUTHENTRY pfnAuthEntry = NULL;
     1134    static PAUTHENTRY2 pfnAuthEntry2 = NULL;
     1135    static PAUTHENTRY3 pfnAuthEntry3 = NULL;
    11351136
    11361137    if (!fAuthLibLoaded)
     
    11611162                }
    11621163
    1163                 if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, "VRDPAuth2", (void**)&pfnAuthEntry2)))
    1164                     WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n", __FUNCTION__, "VRDPAuth2", rc));
    1165 
    1166                 if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, "VRDPAuth", (void**)&pfnAuthEntry)))
    1167                     WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n", __FUNCTION__, "VRDPAuth", rc));
    1168 
    1169                 if (pfnAuthEntry || pfnAuthEntry2)
     1164                if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, AUTHENTRY3_NAME, (void**)&pfnAuthEntry3)))
     1165                    WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n", __FUNCTION__, AUTHENTRY3_NAME, rc));
     1166
     1167                if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, AUTHENTRY2_NAME, (void**)&pfnAuthEntry2)))
     1168                    WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n", __FUNCTION__, AUTHENTRY2_NAME, rc));
     1169
     1170                if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, AUTHENTRY_NAME, (void**)&pfnAuthEntry)))
     1171                    WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n", __FUNCTION__, AUTHENTRY_NAME, rc));
     1172
     1173                if (pfnAuthEntry || pfnAuthEntry2 || pfnAuthEntry3)
    11701174                    fAuthLibLoaded = true;
    11711175
     
    11751179
    11761180    rc = VERR_WEB_NOT_AUTHENTICATED;
    1177     VRDPAuthResult result;
    1178     if (pfnAuthEntry2)
    1179     {
    1180         result = pfnAuthEntry2(NULL, VRDPAuthGuestNotAsked, pcszUsername, pcszPassword, NULL, true, 0);
     1181    AuthResult result;
     1182    if (pfnAuthEntry3)
     1183    {
     1184        result = pfnAuthEntry3("webservice", NULL, AuthGuestNotAsked, pcszUsername, pcszPassword, NULL, true, 0);
     1185        WEBDEBUG(("%s(): result of AuthEntry(): %d\n", __FUNCTION__, result));
     1186        if (result == AuthResultAccessGranted)
     1187            rc = 0;
     1188    }
     1189    else if (pfnAuthEntry2)
     1190    {
     1191        result = pfnAuthEntry2(NULL, AuthGuestNotAsked, pcszUsername, pcszPassword, NULL, true, 0);
    11811192        WEBDEBUG(("%s(): result of VRDPAuth2(): %d\n", __FUNCTION__, result));
    1182         if (result == VRDPAuthAccessGranted)
     1193        if (result == AuthResultAccessGranted)
    11831194            rc = 0;
    11841195    }
    11851196    else if (pfnAuthEntry)
    11861197    {
    1187         result = pfnAuthEntry(NULL, VRDPAuthGuestNotAsked, pcszUsername, pcszPassword, NULL);
     1198        result = pfnAuthEntry(NULL, AuthGuestNotAsked, pcszUsername, pcszPassword, NULL);
    11881199        WEBDEBUG(("%s(): result of VRDPAuth(%s, [%d]): %d\n", __FUNCTION__, pcszUsername, strlen(pcszPassword), result));
    1189         if (result == VRDPAuthAccessGranted)
     1200        if (result == AuthResultAccessGranted)
    11901201            rc = 0;
    11911202    }
     
    11961207    else
    11971208    {
    1198         WEBDEBUG(("Could not resolve VRDPAuth2 or VRDPAuth entry point"));
     1209        WEBDEBUG(("Could not resolve AuthEntry, VRDPAuth2 or VRDPAuth entry point"));
    11991210    }
    12001211
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