Changeset 59645 in vbox
- Timestamp:
- Feb 12, 2016 10:56:22 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 105495
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/vboxweb.cpp
r57439 r59645 756 756 } 757 757 758 /** 759 * Helper for decoding AuthResult. 760 * @param result AuthResult 761 */ 762 static 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 758 773 #ifdef WITH_OPENSSL 759 774 /**************************************************************************** … … 1800 1815 * otherwise. 1801 1816 */ 1802 1803 1817 int WebServiceSession::authenticate(const char *pcszUsername, 1804 1818 const char *pcszPassword, … … 1849 1863 if (RT_FAILURE(rc)) 1850 1864 { 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)); 1852 1867 break; 1853 1868 } … … 1855 1870 if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, AUTHENTRY3_NAME, (void**)&pfnAuthEntry3))) 1856 1871 { 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)); 1858 1874 1859 1875 if (RT_FAILURE(rc = RTLdrGetSymbol(hlibAuth, AUTHENTRY2_NAME, (void**)&pfnAuthEntry2))) 1860 1876 { 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)); 1862 1879 1863 1880 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)); 1865 1883 } 1866 1884 } … … 1878 1896 { 1879 1897 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))); 1881 1899 if (result == AuthResultAccessGranted) 1882 1900 rc = 0; … … 1885 1903 { 1886 1904 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))); 1888 1906 if (result == AuthResultAccessGranted) 1889 1907 rc = 0; … … 1892 1910 { 1893 1911 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))); 1895 1913 if (result == AuthResultAccessGranted) 1896 1914 rc = 0;
Note:
See TracChangeset
for help on using the changeset viewer.