From: Timo Sirainen Date: Wed, 19 Feb 2014 22:54:16 +0000 (-0800) Subject: auth: Don't crash if passdb passwd-file is used without any userdbs. X-Git-Tag: 2.2.13.rc1~214 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7cc2591b010bbf29ea5f35d87c55760684fc8f90;p=thirdparty%2Fdovecot%2Fcore.git auth: Don't crash if passdb passwd-file is used without any userdbs. --- diff --git a/src/auth/db-passwd-file.c b/src/auth/db-passwd-file.c index 7ace5857f4..d9019c6fe2 100644 --- a/src/auth/db-passwd-file.c +++ b/src/auth/db-passwd-file.c @@ -308,6 +308,7 @@ static void db_passwd_file_set_userdb(struct db_passwd_file *db) /* warn about missing userdb fields only when there aren't any other userdbs. */ db->userdb_warn_missing = + array_is_created(&global_auth_settings->userdbs) && array_count(&global_auth_settings->userdbs) == 1; }