git-bootstrap-enable_secure
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sun, 25 Dec 2022 18:42:32 +0000 (18:42 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 25 Dec 2022 18:42:32 +0000 (18:42 +0000)
commit dba88b4f44d80864ec78595526e081ab9b5af278
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Fri Aug 19 02:16:54 2022 +0200

    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.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-bootstrap-enable_secure.diff

sysdeps/mach/hurd/i386/init-first.c

index 09f52e6e37524fa3baf2d7b671a425c336796d51..7d8721856bef43638e7d114c13dc4aa1213735b9 100644 (file)
@@ -100,8 +100,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;