dovecot-2.0: auth: If no passdb is specified, don't fail when us...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 8 17:02:21 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/e392f5f65cd8
changeset: 12090:e392f5f65cd8
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Sep 08 15:02:18 2010 +0100
description:
auth: If no passdb is specified, don't fail when userdb static tries to verify user existence.

diffstat:

 src/auth/userdb-static.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 52e197994a55 -r e392f5f65cd8 src/auth/userdb-static.c
--- 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);
 	}


More information about the dovecot-cvs mailing list