Index | Thread | Search

From:
"Lorenz (xha)" <me@xha.li>
Subject:
Re: don't mention O_NOFOLLOW and O_CLOEXEC in the shm_open(3) manual page
To:
tech@openbsd.org
Date:
Tue, 23 Apr 2024 04:34:41 +0200

Download raw body.

Thread
On Mon, Apr 22, 2024 at 03:38:37PM +0100, Jason McIntyre wrote:
> On Mon, Apr 15, 2024 at 08:02:59PM +0200, Lorenz (xha) wrote:
> > it doesn't make sense to me to document that you can set O_NOFOLLOW
> > and O_CLOEXEC on the file descriptor even though they are always
> > unconditionally set. also, imo O_NOFOLLOW should not be mentioned
> > at all because that is just internal to the implementation.
> > 
> 
> so kettenis@ has told me that he thinks the current wording is fine, so
> as far as i'm concerned, i consider this case closed.

let me explain why i think the current wording is not fine: it
suggests using of non-portable flags, namely O_NOFOLLOW and
O_CLOEXEC, and because of that, also implies that the file descriptor
normally doesn't have it's close-on-exec flag set, which is wrong.

i think that O_NOFOLLOW isn't a good idea either, because the file
names are actually hashed and it's always set anyways.