dovecot-2.0: auth: Give a better error message if pass=yes can't...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 14 17:59:15 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/f451ffa51772
changeset: 12261:f451ffa51772
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 14 15:59:11 2010 +0100
description:
auth: Give a better error message if pass=yes can't be used in master passdb.

diffstat:

 src/auth/auth-request.c |  12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diffs (29 lines):

diff -r 6ea01abfaea9 -r f451ffa51772 src/auth/auth-request.c
--- a/src/auth/auth-request.c	Wed Oct 06 19:49:31 2010 +0100
+++ b/src/auth/auth-request.c	Thu Oct 14 15:59:11 2010 +0100
@@ -358,6 +358,8 @@
 
 static bool auth_request_master_lookup_finish(struct auth_request *request)
 {
+	struct auth_passdb *passdb;
+
 	if (request->passdb_failure)
 		return TRUE;
 
@@ -380,6 +382,16 @@
 	/* the authentication continues with passdb lookup for the
 	   requested_login_user. */
 	request->passdb = auth_request_get_auth(request)->passdbs;
+
+	for (passdb = request->passdb; passdb != NULL; passdb = passdb->next) {
+		if (passdb->passdb->iface.lookup_credentials != NULL)
+			break;
+	}
+	if (passdb == NULL) {
+		auth_request_log_error(request, "passdb",
+			"No passdbs support skipping password verification - "
+			"pass=yes can't be used in master passdb");
+	}
 	return FALSE;
 }
 


More information about the dovecot-cvs mailing list