mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
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.
This commit is contained in:
parent
a8d3760c5b
commit
8d9bb97461
1 changed files with 2 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue