From: Timo Sirainen Date: Sun, 24 Jan 2010 20:58:45 +0000 (+0200) Subject: passwd-file: Give a better error message if args (path) is empty. X-Git-Tag: 2.0.beta2~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c676be2e4d253ce003cf4dfbb13c58ff5d5e4cac;p=thirdparty%2Fdovecot%2Fcore.git passwd-file: Give a better error message if args (path) is empty. --HG-- branch : HEAD --- diff --git a/src/auth/passdb-passwd-file.c b/src/auth/passdb-passwd-file.c index 413f0344e8..3de7bd27e8 100644 --- a/src/auth/passdb-passwd-file.c +++ b/src/auth/passdb-passwd-file.c @@ -143,6 +143,9 @@ passwd_file_preinit(struct auth_passdb *auth_passdb, const char *args) i_fatal("passdb passwd-file: Unknown setting: %s", key); } + if (*args == '\0') + i_fatal("passdb passwd-file: Missing args"); + module = p_new(auth_passdb->auth->pool, struct passwd_file_passdb_module, 1); module->auth = auth_passdb->auth; diff --git a/src/auth/userdb-passwd-file.c b/src/auth/userdb-passwd-file.c index 535f354ba4..35e53e958f 100644 --- a/src/auth/userdb-passwd-file.c +++ b/src/auth/userdb-passwd-file.c @@ -174,6 +174,9 @@ passwd_file_preinit(struct auth_userdb *auth_userdb, const char *args) } } + if (*args == '\0') + i_fatal("userdb passwd-file: Missing args"); + module = p_new(auth_userdb->auth->pool, struct passwd_file_userdb_module, 1); module->auth = auth_userdb->auth;