aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-19 02:16:54 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-19 02:26:21 +0200
commitf7b0fc5cc61301461e3c1a278240ce78701bb9a8 (patch)
tree8e2734b3a8abbe6410f50062e06d7c10d37f770e
parent9125e43daf92e3d4e69044a54b9fe9ed88c861ad (diff)
downloadglibc-f7b0fc5cc61301461e3c1a278240ce78701bb9a8.zip
glibc-f7b0fc5cc61301461e3c1a278240ce78701bb9a8.tar.gz
glibc-f7b0fc5cc61301461e3c1a278240ce78701bb9a8.tar.bz2
hurd: Assume non-suid during bootstrap
We do not have a hurd data block only when bootstrapping the system, in which case we don't have a notion of suid yet anyway. This is needed, otherwise init_standard_fds would check that standard file descriptors are allocated, which is meaningless during bootstrap.
-rw-r--r--sysdeps/mach/hurd/i386/init-first.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
index 534a796..f10d4a1 100644
--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -95,8 +95,13 @@ init1 (int argc, char *arg0, ...)
d = (void *) ++envp;
if ((void *) d == argv[0])
- /* No Hurd data block to process. */
- return;
+ {
+ /* No Hurd data block to process. */
+#ifndef SHARED
+ __libc_enable_secure = 0;
+#endif
+ return;
+ }
#ifndef SHARED
__libc_enable_secure = d->flags & EXEC_SECURE;