![]() |
|
Message-ID: <p6zqecnj4czocoksbicabvp3ec4sgicejct6nhuq4mccisemig@2i3dhnffkav5>
Date: Mon, 17 Feb 2025 10:42:06 +0100
From: Alejandro Colomar <alx@...nel.org>
Cc: libc-help@...rceware.org, linux-man@...r.kernel.org,
Karlson2k <k2k@...od.ru>, Tobias Stoeckmann <tobias@...eckmann.org>,
Serge Hallyn <serge@...lyn.com>, Iker Pedrosa <ipedrosa@...hat.com>,
shadow-utils <~hallyn/shadow@...ts.sr.ht>, Rich Felker <dalias@...c.org>, musl@...ts.openwall.com
Subject: Re: [shadow-maint/shadow] Add cheap defense mechanisms (PR #1171)
Hi,
On Sun, Feb 16, 2025 at 06:15:18PM -0800, Karlson2k wrote:
> Karlson2k left a comment (shadow-maint/shadow#1171)
>
> Doesn't use of glibc extensions break functioning with non-glibc, like musl?
Hmmm, I didn't know musl doesn't support this. It would be interesting
to get them to support it. I've CCd several interested parties in this
email.
>
> Isn't it safe to use constructs like
> ``` C
> shadow = fopen (SGROUP_FILE, "re");
> if (NULL == shadow )
> shadow = fopen (SGROUP_FILE, "r");
> ```
> ?
Is 'e' only available in glibc? Do other libraries consciously not
support O_CLOEXEC in fopen(3)?
I see that POSIX.1-2024 added the 'e' mode string character, so we're
using standard features (yeah, very modern ones, but still standard).
Is there any reason to not implement them, or is it just a matter of
time and contributors?
<https://pubs.opengroup.org/onlinepubs/9799919799/functions/fopen.html>
> Or, alternatively, detect extension in `configure`?
If we have to...
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es/>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.