dir_is_writable: don't treat EPERM from faccessat() as a fatal error.

We can get EPERM on Linux with SELinux.  GitHub issue #122.
This commit is contained in:
Todd C. Miller
2021-11-27 12:34:16 -07:00
parent 003f9550f1
commit f9f39cde20

View File

@@ -200,7 +200,7 @@ dir_is_writable(int dfd, struct sudo_cred *user_cred, struct sudo_cred *cur_cred
if (rc == 0)
debug_return_int(true);
if (errno == EACCES || errno == EROFS)
if (errno == EACCES || errno == EPERM || errno == EROFS)
debug_return_int(false);
debug_return_int(-1);