Commit 8d9bb97
posix: access/accessZ/faccessat/faccessatZ can return AccessDenied or PermissionDenied
`EACCES` is returned if the file mode bit (i.e., user/group/other rwx
bits) disallow access. `EPERM` is returned if something else denies
access (immutable bit, SELinux, capabilities, etc). This somewhat subtle
no-access distinction is part of POSIX. For now map both to
`error.PermissionDenied` to keep the error signature unchanged. See
duopoly.
This PR is effecitvely an update/simplification of PR #19193.
Tested locally with an immutable file.
Fixes #22733 and #19162.1 parent a8d3760 commit 8d9bb97
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4914 | 4914 | | |
4915 | 4915 | | |
4916 | 4916 | | |
| 4917 | + | |
4917 | 4918 | | |
4918 | 4919 | | |
4919 | 4920 | | |
| |||
4999 | 5000 | | |
5000 | 5001 | | |
5001 | 5002 | | |
| 5003 | + | |
5002 | 5004 | | |
5003 | 5005 | | |
5004 | 5006 | | |
| |||
0 commit comments