ce426f
From 83e5edd390eabe8f8e8e0d051f929b77a30c0767 Mon Sep 17 00:00:00 2001
ce426f
From: Andreas Schwab <schwab@redhat.com>
ce426f
Date: Fri, 18 Mar 2011 16:22:52 +0100
ce426f
Subject: [PATCH] ldd: never run file directly
ce426f
ce426f
* elf/ldd.bash.in: Never run file directly.
ce426f
ce426f
---
ce426f
 ChangeLog       |    4 ++++
ce426f
 elf/ldd.bash.in |   14 +-------------
ce426f
 2 files changed, 5 insertions(+), 13 deletions(-)
ce426f
ce426f
--- glibc-2.17-c758a686/elf/ldd.bash.in
ce426f
+++ glibc-2.17-c758a686/elf/ldd.bash.in
ce426f
@@ -166,18 +166,6 @@ warning: you do not have execution permission for" "\`$file'" >&2
ce426f
       fi
ce426f
     done
ce426f
     case $ret in
ce426f
-    0)
ce426f
-      # If the program exits with exit code 5, it means the process has been
ce426f
-      # invoked with __libc_enable_secure.  Fall back to running it through
ce426f
-      # the dynamic linker.
ce426f
-      try_trace "$file"
ce426f
-      rc=$?
ce426f
-      if [ $rc = 5 ]; then
ce426f
-	try_trace "$RTLD" "$file"
ce426f
-	rc=$?
ce426f
-      fi
ce426f
-      [ $rc = 0 ] || result=1
ce426f
-      ;;
ce426f
     1)
ce426f
       # This can be a non-ELF binary or no binary at all.
ce426f
       nonelf "$file" || {
ce426f
@@ -185,7 +173,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
ce426f
 	result=1
ce426f
       }
ce426f
       ;;
ce426f
-    2)
ce426f
+    0|2)
ce426f
       try_trace "$RTLD" "$file" || result=1
ce426f
       ;;
ce426f
     *)