public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] elf: Remove __libc_enable_secure_decided
@ 2022-04-17 22:52 Fangrui Song
  2022-04-18 10:00 ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Fangrui Song @ 2022-04-17 22:52 UTC (permalink / raw)
  To: libc-alpha, Florian Weimer

No functional change. __libc_enable_secure_decided is always 0 since
73fc4e28b9464f0e13edc719a5372839970e7ddb.
---
 elf/enbl-secure.c | 7 ++-----
 include/unistd.h  | 1 -
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/elf/enbl-secure.c b/elf/enbl-secure.c
index aa2a0bd877..6a0a6d0f0f 100644
--- a/elf/enbl-secure.c
+++ b/elf/enbl-secure.c
@@ -26,15 +26,12 @@
 #include <startup.h>
 #include <libc-internal.h>
 
-/* If nonzero __libc_enable_secure is already set.  */
-int __libc_enable_secure_decided;
 /* Safest assumption, if somehow the initializer isn't run.  */
 int __libc_enable_secure = 1;
 
 void
 __libc_init_secure (void)
 {
-  if (__libc_enable_secure_decided == 0)
-    __libc_enable_secure = (startup_geteuid () != startup_getuid ()
-			    || startup_getegid () != startup_getgid ());
+  __libc_enable_secure = (startup_geteuid () != startup_getuid ()
+			  || startup_getegid () != startup_getgid ());
 }
diff --git a/include/unistd.h b/include/unistd.h
index 7090169601..af795a37c8 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -192,7 +192,6 @@ libc_hidden_proto (__tcsetpgrp)
    and some functions contained in the C library ignore various
    environment variables that normally affect them.  */
 extern int __libc_enable_secure attribute_relro;
-extern int __libc_enable_secure_decided;
 rtld_hidden_proto (__libc_enable_secure)
 
 
-- 
2.36.0.rc0.470.gd361397f0d-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-18 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-17 22:52 [PATCH] elf: Remove __libc_enable_secure_decided Fangrui Song
2022-04-18 10:00 ` Florian Weimer
2022-04-18 23:49   ` Fāng-ruì Sòng

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).