VirtualBox

Changeset 59645 in vbox


Ignore:
Timestamp:
Feb 12, 2016 10:56:22 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
105495
Message:

webservice/vboxweb: be a bit more verbose when logging AuthResult, cosmetical fixes

File:
1 edited

Legend:

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

    r57439 r59645  
    756756}
    757757
     758/**
     759 * Helper for decoding AuthResult.
     760 * @param result AuthResult
     761 */
     762static const char * decodeAuthResult(AuthResult result)
     763{
     764    switch (result)
     765    {
     766        case AuthResultAccessDenied:    return "access DENIED";
     767        case AuthResultAccessGranted:   return "access granted";
     768        case AuthResultDelegateToGuest: return "delegated to guest";
     769        default:                        return "unknown AuthResult";
     770    }
     771}
     772
    758773#ifdef WITH_OPENSSL
    759774/****************************************************************************
     
    18001815 *  otherwise.
    18011816 */
    1802 
    18031817int WebServiceSession::authenticate(const char *pcszUsername,
    18041818                                    const char *pcszPassword,
     
    18491863                if (RT_FAILURE(rc))
    18501864                {
    1851                     WEBDEBUG(("%s() Failed to load external authentication library. Error code: %Rrc\n", __FUNCTION__, rc));
     1865                    WEBDEBUG(("%s() Failed to load external authentication library '%s'. Error code: %Rrc\n",
     1866                              __FUNCTION__, filename.c_str(), rc));
    18521867                    break;
    18531868                }
     
    18551870                if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, AUTHENTRY3_NAME, (void**)&pfnAuthEntry3)))
    18561871                {
    1857                     WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n", __FUNCTION__, AUTHENTRY3_NAME, rc));
     1872                    WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n",
     1873                              __FUNCTION__, AUTHENTRY3_NAME, rc));
    18581874
    18591875                    if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, AUTHENTRY2_NAME, (void**)&pfnAuthEntry2)))
    18601876                    {
    1861                         WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n", __FUNCTION__, AUTHENTRY2_NAME, rc));
     1877                        WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n",
     1878                                  __FUNCTION__, AUTHENTRY2_NAME, rc));
    18621879
    18631880                        if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, AUTHENTRY_NAME, (void**)&pfnAuthEntry)))
    1864                             WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n", __FUNCTION__, AUTHENTRY_NAME, rc));
     1881                            WEBDEBUG(("%s(): Could not resolve import '%s'. Error code: %Rrc\n",
     1882                                      __FUNCTION__, AUTHENTRY_NAME, rc));
    18651883                    }
    18661884                }
     
    18781896    {
    18791897        result = pfnAuthEntry3("webservice", NULL, AuthGuestNotAsked, pcszUsername, pcszPassword, NULL, true, 0);
    1880         WEBDEBUG(("%s(): result of AuthEntry(): %d\n", __FUNCTION__, result));
     1898        WEBDEBUG(("%s(): result of AuthEntry(): %d (%s)\n", __FUNCTION__, result, decodeAuthResult(result)));
    18811899        if (result == AuthResultAccessGranted)
    18821900            rc = 0;
     
    18851903    {
    18861904        result = pfnAuthEntry2(NULL, AuthGuestNotAsked, pcszUsername, pcszPassword, NULL, true, 0);
    1887         WEBDEBUG(("%s(): result of VRDPAuth2(): %d\n", __FUNCTION__, result));
     1905        WEBDEBUG(("%s(): result of VRDPAuth2(): %d (%s)\n", __FUNCTION__, result, decodeAuthResult(result)));
    18881906        if (result == AuthResultAccessGranted)
    18891907            rc = 0;
     
    18921910    {
    18931911        result = pfnAuthEntry(NULL, AuthGuestNotAsked, pcszUsername, pcszPassword, NULL);
    1894         WEBDEBUG(("%s(): result of VRDPAuth(%s, [%d]): %d\n", __FUNCTION__, pcszUsername, strlen(pcszPassword), result));
     1912        WEBDEBUG(("%s(): result of VRDPAuth(%s, [%d]): %d (%s)\n", __FUNCTION__, pcszUsername, strlen(pcszPassword), result, decodeAuthResult(result)));
    18951913        if (result == AuthResultAccessGranted)
    18961914            rc = 0;
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