aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2011-12-22 18:10:15 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2011-12-22 18:10:15 +0000
commit9b171ba819bc3eef8f0063725b3b8aada84613e0 (patch)
treed5e282cf271c3af3acbd6f7c2a31d2c8d42e1144
parent432a3b2760a05003e8c2290f4832e0743ac86f89 (diff)
downloadsrc-9b171ba819bc3eef8f0063725b3b8aada84613e0.tar.gz
src-9b171ba819bc3eef8f0063725b3b8aada84613e0.zip
Merge upstream r509: don't log an error in the common case (ENOENT).
Notes
Notes: svn path=/vendor/openpam/dist/; revision=228809
-rw-r--r--lib/openpam_check_owner_perms.c8
1 files 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) ||