[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode
From: |
Sergey Bugaev |
Subject: |
Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode |
Date: |
Wed, 19 Apr 2023 22:40:27 +0300 |
On Wed, Apr 19, 2023, 22:13 Cristian Rodríguez <crrodriguez@opensuse.org> wrote:
> Im a little bit lost on what it was supposed to do in this old form.. as the
> open flags are all wrong..
>
> Changelog says:
>
> (__libc_check_standard_fds): Reverse modes so that common operations on
> the descriptors fail.
>
> So this was intended at some point in the past decades to make it fail..
Ah, I see, so I just failed to trace it through git blame / git log,
because the commit renaming this file sysdeps/generic/check_fds.c ->
csu/check_fds.c has been done wrong (or maybe this is an artefact of
the migration to Git).
So which way would you prefer it, left as-is (i.e. without this patch)
or switched back? If we leave it as is, we should at least add a
comment explaining what's going on, for the next person who stumbles
into this and also fails to trace it through git blame.
> I see it is used only for SUID statically linked binaries.
I might be missing something, but why statically linked only? I don't
see anything like that in elf/Makefile (but maybe I don't know where
to look, please tell me!), and also the same behavior is certainly
exhibited by dynamically linked executables too. That ls -l I posted
above is from a dynamic executable.
> is this really needed now? playing silly games with this fds will always
> result in silly prices.
Sergey
- Re: [RFC PATCH v2 1/7] misc: Convert daemon () to GNU coding style, (continued)
- [RFC PATCH v2 6/7] include/fcntl.h: Define O_IGNORE_CTTY, Sergey Bugaev, 2023/04/19
- [RFC PATCH v2 2/7] misc: Ignore SIGHUP in daemon () while forking, Sergey Bugaev, 2023/04/19
- [RFC PATCH v2 3/7] Use O_CLOEXEC in more places (BZ #15722), Sergey Bugaev, 2023/04/19
- [RFC PATCH v2 4/7] csu: Fix standard fds' mode, Sergey Bugaev, 2023/04/19
- Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode, Cristian Rodríguez, 2023/04/19
- Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode,
Sergey Bugaev <=
- Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode, Adhemerval Zanella Netto, 2023/04/19
- Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode, Sergey Bugaev, 2023/04/19
- Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode, Adhemerval Zanella Netto, 2023/04/20
- Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode, Cristian Rodríguez, 2023/04/20
- Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode, Adhemerval Zanella Netto, 2023/04/20
- Re: [RFC PATCH v2 4/7] csu: Fix standard fds' mode, Paul Eggert, 2023/04/21
[RFC PATCH v2 5/7] hurd: Make dl-sysdep's open () cope with O_IGNORE_CTTY, Sergey Bugaev, 2023/04/19
[RFC PATCH v2 7/7] Use O_IGNORE_CTTY where appropriate, Sergey Bugaev, 2023/04/19