changeset 12090:e392f5f65cd8

auth: If no passdb is specified, don't fail when userdb static tries to verify user existence.
author Timo Sirainen <tss@iki.fi>
date Wed, 08 Sep 2010 15:02:18 +0100
parents 52e197994a55
children 7fef89fea00e
files src/auth/userdb-static.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/userdb-static.c	Wed Sep 08 14:58:31 2010 +0100
+++ b/src/auth/userdb-static.c	Wed Sep 08 15:02:18 2010 +0100
@@ -203,8 +203,14 @@
 				       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);
 	}