Don't log an error message if the file does not exist.

git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@509 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2011-12-22 17:18:53 +00:00
parent 8372b71ce1
commit 8ec4a16273
1 changed files with 5 additions and 3 deletions

View File

@ -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) ||