mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
ldd: never run file directly
This commit is contained in:
parent
f59f7adb4a
commit
eedca9772e
@ -1,3 +1,7 @@
|
||||
2017-08-16 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* elf/ldd.bash.in: Never run file directly.
|
||||
|
||||
2017-08-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #21955]
|
||||
|
@ -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
|
||||
;;
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user