dovecot: Master passdbs are in their own list, so allow pass=yes...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 27 18:41:57 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/2a9edc9136f9
changeset: 6620:2a9edc9136f9
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 27 18:41:54 2007 +0300
description:
Master passdbs are in their own list, so allow pass=yes even if a master
passdb is the last in the list.

diffstat:

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

diffs (20 lines):

diff -r 2a36e7d9ddb6 -r 2a9edc9136f9 src/auth/auth.c
--- a/src/auth/auth.c	Sat Oct 27 18:31:05 2007 +0300
+++ b/src/auth/auth.c	Sat Oct 27 18:41:54 2007 +0300
@@ -61,8 +61,14 @@ struct auth *auth_preinit(void)
 			masterdb_p = &auth_passdb->next;
 		}
 	}
-	if (auth_passdb != NULL && auth_passdb->pass)
-		i_fatal("Last passdb can't have pass=yes");
+	if (auth_passdb != NULL && auth_passdb->pass) {
+		if (masterdb_p != &auth_passdb->next)
+			i_fatal("Last passdb can't have pass=yes");
+		else if (auth->passdbs == NULL) {
+			i_fatal("Master passdb can't have pass=yes "
+				"if there are no passdbs");
+		}
+	}
 	t_pop();
 
 	t_push();


More information about the dovecot-cvs mailing list