arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1452721-1.patch

147e83
commit TBD
147e83
Author: Florian Weimer <fweimer@redhat.com>
147e83
Date:   Fri May 19 17:46:47 2017 +0200
147e83
147e83
    rtld: Completely ignore LD_LIBRARY_PATH for AT_SECURE=1 programs
147e83
147e83
LD_LIBRARY_PATH can only be used to reorder system search paths, which
147e83
is not useful functionality.
147e83
147e83
Index: glibc-2.17-c758a686/elf/rtld.c
147e83
===================================================================
147e83
--- glibc-2.17-c758a686.orig/elf/rtld.c
147e83
+++ glibc-2.17-c758a686/elf/rtld.c
147e83
@@ -2580,7 +2701,8 @@ process_envvars (enum mode *modep)
147e83
 
147e83
 	case 12:
147e83
 	  /* The library search path.  */
147e83
-	  if (memcmp (envline, "LIBRARY_PATH", 12) == 0)
147e83
+	  if (!__libc_enable_secure
147e83
+	      && memcmp (envline, "LIBRARY_PATH", 12) == 0)
147e83
 	    {
147e83
 	      library_path = &envline[13];
147e83
 	      break;