From c801e76565467d2819ab0839804463f635d78b25 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jun 2003 19:54:29 +0000 Subject: 2003-06-26 Roland McGrath * elf/elf.h (AT_SECURE): New macro. * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Grok it, set __libc_enable_secure. (_dl_show_auxv): Add AT_SECURE to name table. * elf/dl-support.c (_dl_aux_init): Grok AT_SECURE, set __libc_enable_secure and __libc_enable_secure_decided. * sysdeps/unix/sysv/linux/ldsodefs.h [__ASSUME_AT_SECURE] (HAVE_AUX_SECURE): Define it. * sysdeps/unix/sysv/linux/kernel-features.h [__LINUX_KERNEL_VERSION >= 132425] (__ASSUME_AT_SECURE): Define it. --- elf/dl-support.c | 5 +++++ elf/elf.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'elf') diff --git a/elf/dl-support.c b/elf/dl-support.c index 0d6ce6a12b..6d83da3328 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -188,6 +188,11 @@ _dl_aux_init (ElfW(auxv_t) *av) gid ^= av->a_un.a_val; seen |= 8; break; + case AT_SECURE: + seen = -1; + __libc_enable_secure = av->a_un.a_val; + __libc_enable_secure_decided = 1; + break; } if (seen == 0xf) { diff --git a/elf/elf.h b/elf/elf.h index 982ce2ca20..a5ac9dbd00 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -945,7 +945,9 @@ typedef struct /* A special ignored value for PPC, used by the kernel to control the interpretation of the AUXV. Must be > 16. */ -#define AT_IGNOREPPC 22 /* Entry should be ignored */ +#define AT_IGNOREPPC 22 /* Entry should be ignored. */ + +#define AT_SECURE 23 /* Boolean, was exec setuid-like? */ /* Pointer to the global system page used for system calls and other nice things. */ -- cgit v1.2.3