public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [hurd,commited] hurd: Assume non-suid during bootstrap
@ 2022-08-19  0:27 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2022-08-19  0:27 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

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.
---
 sysdeps/mach/hurd/i386/init-first.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
index 534a796e0d..f10d4a1bc2 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;
-- 
2.35.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-19  0:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-19  0:27 [hurd,commited] hurd: Assume non-suid during bootstrap Samuel Thibault

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 read-only IMAP folder(s) and NNTP newsgroup(s).