Changeset 34558 in vbox for trunk/src/VBox/Main/webservice
- Timestamp:
- Dec 1, 2010 10:56:44 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 68349
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/vboxweb.cpp
r33540 r34558 1131 1131 1132 1132 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; 1135 1136 1136 1137 if (!fAuthLibLoaded) … … 1161 1162 } 1162 1163 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) 1170 1174 fAuthLibLoaded = true; 1171 1175 … … 1175 1179 1176 1180 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); 1181 1192 WEBDEBUG(("%s(): result of VRDPAuth2(): %d\n", __FUNCTION__, result)); 1182 if (result == VRDPAuthAccessGranted)1193 if (result == AuthResultAccessGranted) 1183 1194 rc = 0; 1184 1195 } 1185 1196 else if (pfnAuthEntry) 1186 1197 { 1187 result = pfnAuthEntry(NULL, VRDPAuthGuestNotAsked, pcszUsername, pcszPassword, NULL);1198 result = pfnAuthEntry(NULL, AuthGuestNotAsked, pcszUsername, pcszPassword, NULL); 1188 1199 WEBDEBUG(("%s(): result of VRDPAuth(%s, [%d]): %d\n", __FUNCTION__, pcszUsername, strlen(pcszPassword), result)); 1189 if (result == VRDPAuthAccessGranted)1200 if (result == AuthResultAccessGranted) 1190 1201 rc = 0; 1191 1202 } … … 1196 1207 else 1197 1208 { 1198 WEBDEBUG(("Could not resolve VRDPAuth2 or VRDPAuth entry point"));1209 WEBDEBUG(("Could not resolve AuthEntry, VRDPAuth2 or VRDPAuth entry point")); 1199 1210 } 1200 1211
Note:
See TracChangeset
for help on using the changeset viewer.