glibc/ldd-system-interp.patch
Andreas Schwab f99cf3ddb6 Accepting request 227472 from home:Andreas_Schwab:Factory
- abort-no-flush.patch: Don't close or flush stdio streams on abort (BZ
  #15436)
- fix-locking-in-_IO_cleanup.patch: always do locking when accessing
  streams (bnc#796982, BZ #15142)
- resolv-dont-ignore-second-answer.patch: don't ignore second answer from
  nameserver if the first one was empty (bnc#767266, BZ #13651)
- ldd-system-interp.patch: Never try to execute the file in ldd
  (bnc#677787, BZ #16750)

- check-pf-alloca.patch: Account for alloca use when collecting interface
  addresses (bnc#785041, BZ #16002)

- powerpc-opt-power8.patch: two more POWER8 optimisations (bnc#866711,
  fate#315443)

- getaddrinfo-uninit-result.patch: Fix use of half-initialized result in
  getaddrinfo when using nscd (bnc#867636, BZ #16743)

OBS-URL: https://build.opensuse.org/request/show/227472
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=343
2014-03-25 14:45:48 +00:00

52 lines
1.5 KiB
Diff

Never try to execute the file in ldd
Executing a random file is never a good idea. Treat all arguments as if
they are invoked with __libc_enable_secure, and run them through the known
good dynamic linker.
* elf/ldd.bash.in: Always run through the dynamic linker, even if
the file has its own interpreter. Remove unneeded executable
check.
Index: glibc-2.19/elf/ldd.bash.in
===================================================================
--- glibc-2.19.orig/elf/ldd.bash.in
+++ glibc-2.19/elf/ldd.bash.in
@@ -150,8 +150,6 @@ for file do
echo "ldd: ${file}:" $"not regular file" >&2
result=1
elif test -r "$file"; then
- test -x "$file" || echo 'ldd:' $"\
-warning: you do not have execution permission for" "\`$file'" >&2
RTLD=
ret=1
for rtld in ${RTLDLIST}; do
@@ -164,18 +162,6 @@ warning: you do not have execution permi
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 +169,7 @@ warning: you do not have execution permi
result=1
}
;;
- 2)
+ [02])
try_trace "$RTLD" "$file" || result=1
;;
*)