All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: access(2): document EPERM error value
       [not found] <2f39442130f5717a@sudo.ws>
@ 2021-12-18 18:49 ` Alejandro Colomar (man-pages)
  2021-12-18 20:28   ` Todd C. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-12-18 18:49 UTC (permalink / raw)
  To: Todd C. Miller; +Cc: Michael Kerrisk, linux-man

Hello Todd,

On 11/28/21 16:39, Todd C. Miller wrote:
> 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.
> 
> 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
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>

     Reported-by: "Todd C. Miller" <Todd.Miller@sudo.ws>
     Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

diff --git a/man2/access.2 b/man2/access.2
index 3b3992488..6c084826e 100644
--- a/man2/access.2
+++ b/man2/access.2
@@ -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


-- 
Alejandro Colomar
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: access(2): document EPERM error value
  2021-12-18 18:49 ` access(2): document EPERM error value Alejandro Colomar (man-pages)
@ 2021-12-18 20:28   ` Todd C. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: Todd C. Miller @ 2021-12-18 20:28 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: Michael Kerrisk, linux-man

Looks good, thanks!

 - todd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-18 20:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2f39442130f5717a@sudo.ws>
2021-12-18 18:49 ` access(2): document EPERM error value Alejandro Colomar (man-pages)
2021-12-18 20:28   ` Todd C. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.