]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Fix passwd-file logging on missing passwd-file
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 15 May 2018 11:32:41 +0000 (14:32 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Sat, 19 May 2018 07:29:37 +0000 (10:29 +0300)
This reduces log clutter in production systems that use per-domain
password files by logging the missing file information only
when auth_verbose=yes.

Broken in daabad64d90d6008215e234287255a56312e7b72

src/auth/db-passwd-file.c

index 194ce84d36e0602eaa7e10d24671297aa58b6b4f..f4f54016d7ddeb9a2a2d6cc64d872e87c2d1dcae 100644 (file)
@@ -267,6 +267,9 @@ static int passwd_file_sync(struct auth_request *request,
                if (errno == EACCES) {
                        auth_request_log_error(request, AUTH_SUBSYS_DB,
                                "%s", eacces_error_get("stat", pw->path));
+               } else if (errno == ENOENT) {
+                       auth_request_log_info(request, "passwd-file",
+                                             "missing passwd file: %s", pw->path);
                } else {
                        auth_request_log_error(request, AUTH_SUBSYS_DB,
                                "stat(%s) failed: %m", pw->path);