dovecot-2.1: auth: Check also masterdbs when checking if auth me...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jan 9 20:54:04 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/32f61c8498a4
changeset: 13914:32f61c8498a4
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jan 09 20:53:51 2012 +0200
description:
auth: Check also masterdbs when checking if auth mechanism can be used.
Patch by Yubao Liu

diffstat:

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

diffs (36 lines):

diff -r 7c39b94ded90 -r 32f61c8498a4 src/auth/auth.c
--- a/src/auth/auth.c	Mon Jan 09 20:31:53 2012 +0200
+++ b/src/auth/auth.c	Mon Jan 09 20:53:51 2012 +0200
@@ -51,6 +51,10 @@
 {
 	struct auth_passdb *passdb;
 
+	for (passdb = auth->masterdbs; passdb != NULL; passdb = passdb->next) {
+		if (passdb->passdb->iface.verify_plain != NULL)
+			return TRUE;
+	}
 	for (passdb = auth->passdbs; passdb != NULL; passdb = passdb->next) {
 		if (passdb->passdb->iface.verify_plain != NULL)
 			return TRUE;
@@ -62,6 +66,10 @@
 {
 	struct auth_passdb *passdb;
 
+	for (passdb = auth->masterdbs; passdb != NULL; passdb = passdb->next) {
+		if (passdb->passdb->iface.lookup_credentials != NULL)
+			return TRUE;
+	}
 	for (passdb = auth->passdbs; passdb != NULL; passdb = passdb->next) {
 		if (passdb->passdb->iface.lookup_credentials != NULL)
 			return TRUE;
@@ -73,6 +81,10 @@
 {
 	struct auth_passdb *passdb;
 
+	for (passdb = auth->masterdbs; passdb != NULL; passdb = passdb->next) {
+		if (passdb->passdb->iface.set_credentials != NULL)
+			return TRUE;
+	}
 	for (passdb = auth->passdbs; passdb != NULL; passdb = passdb->next) {
 		if (passdb->passdb->iface.set_credentials != NULL)
 			return TRUE;


More information about the dovecot-cvs mailing list