]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Don't crash if passwd-file can't be opened
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 8 Jan 2016 16:12:21 +0000 (18:12 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 8 Jan 2016 16:12:21 +0000 (18:12 +0200)
src/auth/db-passwd-file.c

index 8ebfaca75e4cf86586473bdf689658317bb5cb44..df41c12d9deac14491524ce47b0c4039c27f1177 100644 (file)
@@ -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) {