mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Alejandro Colomar <alx@kernel.org>
Cc: libc-help@sourceware.org, linux-man@vger.kernel.org,
	 Karlson2k <k2k@narod.ru>,
	Tobias Stoeckmann <tobias@stoeckmann.org>,
	 Serge Hallyn <serge@hallyn.com>,
	Iker Pedrosa <ipedrosa@redhat.com>,
	 shadow-utils <~hallyn/shadow@lists.sr.ht>,
	Rich Felker <dalias@libc.org>,
	musl@lists.openwall.com
Subject: [musl] Re: [shadow-maint/shadow] Add cheap defense mechanisms (PR #1171)
Date: Mon, 17 Feb 2025 10:42:06 +0100	[thread overview]
Message-ID: <p6zqecnj4czocoksbicabvp3ec4sgicejct6nhuq4mccisemig@2i3dhnffkav5> (raw)
In-Reply-To: <shadow-maint/shadow/pull/1171/c2661802270@github.com>

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

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/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

       reply	other threads:[~2025-02-17  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <shadow-maint/shadow/pull/1171@github.com>
     [not found] ` <shadow-maint/shadow/pull/1171/c2661802270@github.com>
2025-02-17  9:42   ` Alejandro Colomar [this message]
2025-02-17 13:43     ` Alejandro Colomar
2025-02-17 14:44     ` Rich Felker
2025-02-17 15:05       ` Evgeny Grin
2025-02-17 15:08       ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=p6zqecnj4czocoksbicabvp3ec4sgicejct6nhuq4mccisemig@2i3dhnffkav5 \
    --to=alx@kernel.org \
    --cc=dalias@libc.org \
    --cc=ipedrosa@redhat.com \
    --cc=k2k@narod.ru \
    --cc=libc-help@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=musl@lists.openwall.com \
    --cc=serge@hallyn.com \
    --cc=tobias@stoeckmann.org \
    --cc=~hallyn/shadow@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).