# HG changeset patch # User Timo Sirainen # Date 1193499714 -10800 # Node ID 2a9edc9136f994e0b3a0716459229d6ccf83b2e0 # Parent 2a36e7d9ddb67346d98cb3e7837ee7f421197b6a Master passdbs are in their own list, so allow pass=yes even if a master passdb is the last in the list. 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 @@ 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();