diff -X /home/sds/dontdiff -ru glibc-2.3.2-200304020432.orig/elf/elf.h glibc-2.3.2-200304020432/elf/elf.h --- glibc-2.3.2-200304020432.orig/elf/elf.h 2003-03-02 06:41:51.000000000 -0500 +++ glibc-2.3.2-200304020432/elf/elf.h 2003-06-10 14:55:10.000000000 -0400 @@ -946,6 +946,8 @@ interpretation of the AUXV. Must be > 16. */ #define AT_IGNOREPPC 22 /* Entry should be ignored */ +#define AT_SECURE 23 /* Secure mode boolean */ + /* Pointer to the global system page used for system calls and other nice things. */ #define AT_SYSINFO 32 diff -X /home/sds/dontdiff -ru glibc-2.3.2-200304020432.orig/sysdeps/generic/dl-sysdep.c glibc-2.3.2-200304020432/sysdeps/generic/dl-sysdep.c --- glibc-2.3.2-200304020432.orig/sysdeps/generic/dl-sysdep.c 2003-03-15 18:09:21.000000000 -0500 +++ glibc-2.3.2-200304020432/sysdeps/generic/dl-sysdep.c 2003-06-10 15:27:04.000000000 -0400 @@ -81,6 +81,7 @@ ElfW(auxv_t) *av; uid_t uid = 0; gid_t gid = 0; + long secure = -1; #ifdef HAVE_AUX_XID # define set_seen(tag) (tag) /* Evaluate for the side effects. */ #else @@ -123,6 +124,9 @@ case AT_EGID: gid ^= av->a_un.a_val; break; + case AT_SECURE: + secure = av->a_un.a_val; + break; case AT_PLATFORM: GL(dl_platform) = av->a_un.a_ptr; break; @@ -149,6 +153,9 @@ DL_SYSDEP_OSCHECK (dl_fatal); #endif + if (secure != -1) { + INTUSE(__libc_enable_secure) = secure; + } else { /* Fill in the values we have not gotten from the kernel through the auxiliary vector. */ #ifndef HAVE_AUX_XID @@ -163,6 +170,7 @@ /* If one of the two pairs of IDs does not mattch this is a setuid or setgid run. */ INTUSE(__libc_enable_secure) = uid | gid; + } #ifndef HAVE_AUX_PAGESIZE if (GL(dl_pagesize) == 0)