]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: If no passdb is specified, don't fail when userdb static tries to verify user...
authorTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 14:02:18 +0000 (15:02 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 14:02:18 +0000 (15:02 +0100)
src/auth/userdb-static.c

index b570aa993bd6df12fced48abe3dd498eff199c17..df70ac4f4c0b813db8c5df60a38221fa919d99a9 100644 (file)
@@ -203,8 +203,14 @@ static void static_lookup(struct auth_request *auth_request,
                                       AUTH_REQUEST_STATE_MECH_CONTINUE);
 
                auth_request->context = ctx;
-               auth_request_lookup_credentials(auth_request, "",
-                                               static_credentials_callback);
+               if (auth_request->passdb != NULL) {
+                       auth_request_lookup_credentials(auth_request, "",
+                               static_credentials_callback);
+               } else {
+                       static_credentials_callback(
+                               PASSDB_RESULT_SCHEME_NOT_AVAILABLE,
+                               NULL, 0, auth_request);
+               }
        } else {
                static_lookup_real(auth_request, callback);
        }