From: Timo Sirainen Date: Fri, 8 Jan 2016 16:12:21 +0000 (+0200) Subject: auth: Don't crash if passwd-file can't be opened X-Git-Tag: 2.2.22.rc1~373 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0102fd5f7e239ec45ea21a6d0ce0fa8c4521e63c;p=thirdparty%2Fdovecot%2Fcore.git auth: Don't crash if passwd-file can't be opened --- diff --git a/src/auth/db-passwd-file.c b/src/auth/db-passwd-file.c index 8ebfaca75e..df41c12d9d 100644 --- a/src/auth/db-passwd-file.c +++ b/src/auth/db-passwd-file.c @@ -263,7 +263,7 @@ static int passwd_file_sync(struct auth_request *request, const char *error; if (pw->last_sync_time == ioloop_time) - return 0; + return hash_table_is_created(pw->users) ? 0 : -1; pw->last_sync_time = ioloop_time; if (stat(pw->path, &st) < 0) {