initial commit
[glibc.git] / debian / patches / hurd-i386 / git-bootstrap-enable_secure.diff
1 commit dba88b4f44d80864ec78595526e081ab9b5af278
2 Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
3 Date: Fri Aug 19 02:16:54 2022 +0200
4
5 hurd: Assume non-suid during bootstrap
6
7 We do not have a hurd data block only when bootstrapping the system, in
8 which case we don't have a notion of suid yet anyway.
9
10 This is needed, otherwise init_standard_fds would check that standard
11 file descriptors are allocated, which is meaningless during bootstrap.
12
13 diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
14 index 534a796e0d..f10d4a1bc2 100644
15 --- a/sysdeps/mach/hurd/i386/init-first.c
16 +++ b/sysdeps/mach/hurd/i386/init-first.c
17 @@ -95,8 +95,13 @@ init1 (int argc, char *arg0, ...)
18 d = (void *) ++envp;
19
20 if ((void *) d == argv[0])
21 - /* No Hurd data block to process. */
22 - return;
23 + {
24 + /* No Hurd data block to process. */
25 +#ifndef SHARED
26 + __libc_enable_secure = 0;
27 +#endif
28 + return;
29 + }
30
31 #ifndef SHARED
32 __libc_enable_secure = d->flags & EXEC_SECURE;