"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
"Todd C. Miller" <millert@openbsd.org>
Subject:
Re: -portable: add a wrapper for open() on FreeBSD
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 25 Sep 2021 15:40:14 -0600

Download raw body.

Thread
On Sat, 25 Sep 2021 23:20:54 +0200, Christian Weisgerber wrote:

> add a wrapper function to render open() POSIX-compliant on FreeBSD
>
> POSIX mandates that open(symlink, O_NOFOLLOW) fail with errno == ELOOP.
> FreeBSD chooses to deviate from this, but Got depends on it.  Introducing
> a wrapper avoids (1) the need to patch every occurrence, (2) having to
> check each release for new instances, and (3) slipups when modifying
> complex boolean expressions.

Is this really better than just checking for EMLINK in addition to
ELOOP?  Is it worth filing a bug with FreeBSD about this or do they
consider it to be a feature?

 - todd