File: unsubmitted-getaux_at_secure.diff

package info (click to toggle)
glibc 2.41-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates
  • size: 300,384 kB
  • sloc: ansic: 1,050,583; asm: 238,243; makefile: 20,379; python: 13,537; sh: 11,827; cpp: 5,197; awk: 1,795; perl: 317; yacc: 292; pascal: 182; sed: 19
file content (30 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FIXME: sysdeps/mach/hurd/i386/init-first.c should instead pass an auxv
to __libc_start_main

Index: glibc-2.33/misc/getauxval.c
===================================================================
--- glibc-2.33.orig/misc/getauxval.c
+++ glibc-2.33/misc/getauxval.c
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <ldsodefs.h>
 #include <stdbool.h>
+#include <unistd.h>
 
 bool
 __getauxval2 (unsigned long int type, unsigned long int *result)
@@ -27,6 +28,14 @@ __getauxval2 (unsigned long int type, un
   ElfW(auxv_t) *p;
 #endif
 
+#ifdef AT_SECURE
+  if (type == AT_SECURE)
+    {
+      *result = __libc_enable_secure;
+      return true;
+    }
+#endif
+
   if (type == AT_HWCAP)
     {
       *result = GLRO(dl_hwcap);