From 7cc2591b010bbf29ea5f35d87c55760684fc8f90 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 19 Feb 2014 14:54:16 -0800 Subject: [PATCH] auth: Don't crash if passdb passwd-file is used without any userdbs. --- src/auth/db-passwd-file.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.47.3