2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 21:38:05 +00:00

now ignore EPERM

This commit is contained in:
Todd C. Miller 1994-02-16 17:53:18 +00:00
parent a2f434a5bd
commit 5bbf149cb6

View File

@ -142,7 +142,7 @@ char *find_path(file)
if (!statfailed && (statbuf.st_mode & 0000111)) if (!statfailed && (statbuf.st_mode & 0000111))
return (qualify(fn)); return (qualify(fn));
else if (statfailed && errno != ENOENT && errno != ENOTDIR && else if (statfailed && errno != ENOENT && errno != ENOTDIR &&
errno != EINVAL) { errno != EINVAL && errno != EPERM) {
fprintf(stderr, "sudo: Can't stat %s: ", fn); fprintf(stderr, "sudo: Can't stat %s: ", fn);
perror(""); perror("");
} }
@ -164,7 +164,7 @@ char *find_path(file)
if (!statfailed && (statbuf.st_mode & 0000111)) if (!statfailed && (statbuf.st_mode & 0000111))
return (qualify(fn)); return (qualify(fn));
else if (statfailed && errno != ENOENT && errno != ENOTDIR && else if (statfailed && errno != ENOENT && errno != ENOTDIR &&
errno != EINVAL) { errno != EINVAL && errno != EPERM) {
fprintf(stderr, "sudo: Can't stat %s: ", fn); fprintf(stderr, "sudo: Can't stat %s: ", fn);
perror(""); perror("");
return (NULL); return (NULL);