From 22b79ed7f413cd980a7af0cf258da5bf82b6d5e5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 15 Jan 2021 06:46:12 -0800 Subject: Use in __libc_init_secure Since __libc_init_secure is called before ARCH_SETUP_TLS, it must use "int $0x80" for system calls in i386 static PIE. Add startup_getuid, startup_geteuid, startup_getgid and startup_getegid to . Update __libc_init_secure to use them. Reviewed-by: Adhemerval Zanella --- elf/enbl-secure.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'elf') diff --git a/elf/enbl-secure.c b/elf/enbl-secure.c index bc8c5e96d2..5dcf649626 100644 --- a/elf/enbl-secure.c +++ b/elf/enbl-secure.c @@ -19,7 +19,7 @@ /* This file is used in the static libc. For the shared library, dl-sysdep.c defines and initializes __libc_enable_secure. */ -#include +#include #include /* If nonzero __libc_enable_secure is already set. */ @@ -31,6 +31,6 @@ void __libc_init_secure (void) { if (__libc_enable_secure_decided == 0) - __libc_enable_secure = (__geteuid () != __getuid () - || __getegid () != __getgid ()); + __libc_enable_secure = (startup_geteuid () != startup_getuid () + || startup_getegid () != startup_getgid ()); } -- cgit 1.4.1