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