Index | Thread | Search

From:
"Theo de Raadt" <deraadt@openbsd.org>
Subject:
Re: Locking down openat(2) and friends with O_BELOW and F_BELOW
To:
Christian Schulte <cs@schulte.it>
Cc:
tech@openbsd.org
Date:
Sun, 04 Oct 2026 17:21:40 -0600

Download raw body.

Thread
Actually, a better way for -portable software to handle this might be
to do this at a higher level:

#ifndef F_BELOW
#define F_BELOW F_GETFL
#endif

This will return a value which isn't -1 with errno, and can be
safely ignored.  So either (void) or non-(void) constructs will work.
In that case I don't need any of these #ifndef in the tree.