aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2017-08-16 15:59:55 +0200
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2018-04-06 15:55:17 -0300
commit89dc0372bb497b7d51bcf9999ce3f9684d450959 (patch)
tree7010a9c22d4ab72414b32939c4bd88e699394905
parent1be1845b280cfadff0cbd09170af554549849ffb (diff)
downloadglibc-89dc0372bb497b7d51bcf9999ce3f9684d450959.tar
glibc-89dc0372bb497b7d51bcf9999ce3f9684d450959.tar.gz
glibc-89dc0372bb497b7d51bcf9999ce3f9684d450959.tar.bz2
glibc-89dc0372bb497b7d51bcf9999ce3f9684d450959.zip
ldd: never run file directly
(cherry picked from commit eedca9772e99c72ab4c3c34e43cc764250aa3e3c)
-rw-r--r--ChangeLog4
-rw-r--r--elf/ldd.bash.in14
2 files changed, 5 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index c5389fa56c..643aeb9419 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-16 Andreas Schwab <schwab@suse.de>
+
+ * elf/ldd.bash.in: Never run file directly.
+
2016-10-14 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
* sysdeps/powerpc/bits/hwcap.h: Add PPC_FEATURE2_HTM_NOSC.
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index 7fb6c157a0..9cb1636f40 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -164,18 +164,6 @@ warning: you do not have execution permission for" "\`$file'" >&2
fi
done
case $ret in
- 0)
- # If the program exits with exit code 5, it means the process has been
- # invoked with __libc_enable_secure. Fall back to running it through
- # the dynamic linker.
- try_trace "$file"
- rc=$?
- if [ $rc = 5 ]; then
- try_trace "$RTLD" "$file"
- rc=$?
- fi
- [ $rc = 0 ] || result=1
- ;;
1)
# This can be a non-ELF binary or no binary at all.
nonelf "$file" || {
@@ -183,7 +171,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
result=1
}
;;
- 2)
+ 0|2)
try_trace "$RTLD" "$file" || result=1
;;
*)