dovecot: If no userdbs are defined, fallback to an empty static ...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jul 3 03:55:59 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/f622396e03ef
changeset: 5878:f622396e03ef
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 03 03:55:48 2007 +0300
description:
If no userdbs are defined, fallback to an empty static one.

diffstat:

1 file changed, 4 insertions(+), 3 deletions(-)
src/auth/auth.c |    7 ++++---

diffs (20 lines):

diff -r a3bbf340694f -r f622396e03ef src/auth/auth.c
--- a/src/auth/auth.c	Tue Jul 03 03:55:36 2007 +0300
+++ b/src/auth/auth.c	Tue Jul 03 03:55:48 2007 +0300
@@ -73,12 +73,13 @@ struct auth *auth_preinit(void)
 
                 args = getenv(t_strdup_printf("USERDB_%u_ARGS", i));
 		userdb_preinit(auth, driver, args);
-
 	}
 	t_pop();
 
-	if (auth->userdbs == NULL)
-		i_fatal("You'll need to add at least one userdb");
+	if (auth->userdbs == NULL) {
+		/* use a dummy userdb static. */
+		userdb_preinit(auth, "static", "");
+	}
 	return auth;
 }
 


More information about the dovecot-cvs mailing list