]> git.pld-linux.org Git - packages/glibc.git/blame - glibc-secureexec.patch
- oops
[packages/glibc.git] / glibc-secureexec.patch
CommitLineData
2218bc6b 1diff -X /home/sds/dontdiff -ru glibc-2.3.2-200304020432.orig/elf/elf.h glibc-2.3.2-200304020432/elf/elf.h
2--- glibc-2.3.2-200304020432.orig/elf/elf.h 2003-03-02 06:41:51.000000000 -0500
3+++ glibc-2.3.2-200304020432/elf/elf.h 2003-06-10 14:55:10.000000000 -0400
4@@ -946,6 +946,8 @@
5 interpretation of the AUXV. Must be > 16. */
6 #define AT_IGNOREPPC 22 /* Entry should be ignored */
7
8+#define AT_SECURE 23 /* Secure mode boolean */
9+
10 /* Pointer to the global system page used for system calls and other
11 nice things. */
12 #define AT_SYSINFO 32
13diff -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
14--- glibc-2.3.2-200304020432.orig/sysdeps/generic/dl-sysdep.c 2003-03-15 18:09:21.000000000 -0500
15+++ glibc-2.3.2-200304020432/sysdeps/generic/dl-sysdep.c 2003-06-10 15:27:04.000000000 -0400
16@@ -81,6 +81,7 @@
17 ElfW(auxv_t) *av;
18 uid_t uid = 0;
19 gid_t gid = 0;
20+ long secure = -1;
21 #ifdef HAVE_AUX_XID
22 # define set_seen(tag) (tag) /* Evaluate for the side effects. */
23 #else
24@@ -123,6 +124,9 @@
25 case AT_EGID:
26 gid ^= av->a_un.a_val;
27 break;
28+ case AT_SECURE:
29+ secure = av->a_un.a_val;
30+ break;
31 case AT_PLATFORM:
32 GL(dl_platform) = av->a_un.a_ptr;
33 break;
34@@ -149,6 +153,9 @@
35 DL_SYSDEP_OSCHECK (dl_fatal);
36 #endif
37
38+ if (secure != -1) {
39+ INTUSE(__libc_enable_secure) = secure;
40+ } else {
41 /* Fill in the values we have not gotten from the kernel through the
42 auxiliary vector. */
43 #ifndef HAVE_AUX_XID
44@@ -163,6 +170,7 @@
45 /* If one of the two pairs of IDs does not mattch this is a setuid
46 or setgid run. */
47 INTUSE(__libc_enable_secure) = uid | gid;
48+ }
49
50 #ifndef HAVE_AUX_PAGESIZE
51 if (GL(dl_pagesize) == 0)
This page took 0.033124 seconds and 4 git commands to generate.