access(2): document EPERM error value
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello Todd,
Quoted 9 lines · Todd C. Miller
I'm sending this via email rather than bugzilla as it is a fairly trivial change.
If a file/directory has the immutable flag set, access/faccessat will return EPERM if write access is requested. This is not currently documented, presumably because it is Linux-specific (though BSD has similar behavior that is documented). Perhaps something like the following in the ERRORS section.
Quoted 7 lines
EPERM Write permission was requested and pathname has the immutable
flag set. (See alsoioctl_iflags(2).)Also perhaps add
ioctl_iflags(2)to the SEE ALSO section.This came up in reference to:
https://github.com/sudo-project/sudo/issues/122
Thanks for the report!
I applied the following.
Cheers,
Alex
---
access.2: Document EPERM error code
[Todd]:
If a file/directory has the immutable flag set, access/faccessat will return EPERM if write access is requested. This is not currently documented, presumably because it is Linux-specific (though BSD has similar behavior that is documented). Perhaps something like the following in the ERRORS section.
EPERM Write permission was requested and pathname has the
immutable flag set. (See also ioctl_iflags(2).)
Also perhaps add ioctl_iflags(2) to the SEE ALSO section.
This came up in reference to:
<https://github.com/sudo-project/sudo/issues/122>
man2/access.2 +5 -0
@@ -280,6 +280,11 @@ is relative and .I dirfd is a file descriptor referring to a file other than a directory. .TP +.B EPERM +Write permission was requested to a file that has the immutable flag set. +See also +.BR ioctl_iflags (2). +.TP .B EROFS Write permission was requested for a file on a read-only filesystem. .TP
Signature · 2 lines
Alejandro Colomar Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Looks good, thanks!
- todd