From 8944658d904917b82ba31f5fbee46b5aebac9182 Mon Sep 17 00:00:00 2001 From: des Date: Thu, 22 Dec 2011 18:10:15 +0000 Subject: [PATCH] Merge upstream r509: don't log an error in the common case (ENOENT). --- lib/openpam_check_owner_perms.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/openpam_check_owner_perms.c b/lib/openpam_check_owner_perms.c index 67cedc08ec53..9d64ed6e8b3a 100644 --- a/lib/openpam_check_owner_perms.c +++ b/lib/openpam_check_owner_perms.c @@ -104,9 +104,11 @@ openpam_check_path_owner_perms(const char *path) len = strlen(pathbuf); while (len > 0) { if (stat(pathbuf, &sb) != 0) { - serrno = errno; - openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); - errno = serrno; + if (errno != ENOENT) { + serrno = errno; + openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); + errno = serrno; + } return (-1); } if ((sb.st_uid != root && sb.st_uid != arbitrator) ||