about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-12-08 22:08:52 +0000
committerRoland McGrath <roland@gnu.org>2004-12-08 22:08:52 +0000
commitf57a3c946af8a254679a9718c54e50c2c0057694 (patch)
tree6463e1fef01c687bf040095b244102c726f84760 /elf/rtld.c
parent77474ccd4646a58f96550325ac44cdb0e6a35e58 (diff)
downloadglibc-f57a3c946af8a254679a9718c54e50c2c0057694.tar.gz
glibc-f57a3c946af8a254679a9718c54e50c2c0057694.tar.xz
glibc-f57a3c946af8a254679a9718c54e50c2c0057694.zip
* elf/ldd.bash.in: When set -o pipefail is available, use that for
	piping to cat; when not, don't use the pipe at all.
	Pipe to cat in all cases of running the executable.
	When direct running exits with code 5, retry running via ${RTLD}.
	* elf/rtld.c (process_envvars): If __libc_enable_secure and
	mode != normal, exit with exitcode 5.
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 13f7b4f748..cd40f80088 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -2269,9 +2269,11 @@ process_envvars (enum mode *modep)
       if (__access ("/etc/suid-debug", F_OK) != 0)
         {
 	  unsetenv ("MALLOC_CHECK_");
-	  if (mode == normal)
-	    GLRO(dl_debug_mask) = 0;
+	  GLRO(dl_debug_mask) = 0;
         }
+
+      if (mode != normal)
+	_exit (5);
     }
   /* If we have to run the dynamic linker in debugging mode and the
      LD_DEBUG_OUTPUT environment variable is given, we write the debug