Treat EROFS (like EACCES) as a non-fatal error in dir_is_writable().
Fixes sudoedit on macOS 10.15 and above where the root file system is mounted read-only. See https://support.apple.com/en-us/HT210650. From Dan Villiom Podlaski Christiansen. Bug #913
This commit is contained in:
@@ -133,7 +133,7 @@ dir_is_writable(int dfd, struct user_details *ud, struct command_details *cd)
|
|||||||
|
|
||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
debug_return_int(true);
|
debug_return_int(true);
|
||||||
if (errno == EACCES)
|
if (errno == EACCES || errno == EROFS)
|
||||||
debug_return_int(false);
|
debug_return_int(false);
|
||||||
debug_return_int(-1);
|
debug_return_int(-1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user