[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r3942 - in glibc-package/trunk/debian: . patches patches/all patches/any



Author: aurel32
Date: 2009-11-08 20:59:20 +0000 (Sun, 08 Nov 2009)
New Revision: 3942

Removed:
   glibc-package/trunk/debian/patches/any/local-ldd.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/all/local-ldd.diff
   glibc-package/trunk/debian/patches/series
Log:
  * patches/all/local-ldd.diff: always trace dynamic library 
    dependencies through the dynamic linker.  Closes: #552518.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2009-11-08 20:28:57 UTC (rev 3941)
+++ glibc-package/trunk/debian/changelog	2009-11-08 20:59:20 UTC (rev 3942)
@@ -1,9 +1,11 @@
 eglibc (2.10.1-7) UNRELEASED; urgency=low
 
   * patches/all/local-ldd.diff: new patch to handle the case where ld.so is
-    not executable (wrong architecture).  Closes: #502189.
+    not executable (wrong architecture), and always trace dynamic library 
+    dependencies through the dynamic linker.  Closes: #502189, 
+    #552518.
 
- -- Aurelien Jarno <aurel32@debian.org>  Sun, 08 Nov 2009 21:28:35 +0100
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 08 Nov 2009 21:58:59 +0100
 
 eglibc (2.10.1-6) unstable; urgency=high
 

Modified: glibc-package/trunk/debian/patches/all/local-ldd.diff
===================================================================
--- glibc-package/trunk/debian/patches/all/local-ldd.diff	2009-11-08 20:28:57 UTC (rev 3941)
+++ glibc-package/trunk/debian/patches/all/local-ldd.diff	2009-11-08 20:59:20 UTC (rev 3942)
@@ -1,17 +1,50 @@
 2009-11-08  Aurelien Jarno  <aurelien@aurel32.net>
 
-	* elf/ldd.bash.in: also handle error code 126 (ld.so non 
-	executable).
+	* elf/ldd.bash.in: also handle error code 126 (ld.so non
+	executable). Always trace dynamic library dependencies through
+	the dynamic linker.
 
 --- a/elf/ldd.bash.in
 +++ b/elf/ldd.bash.in
-@@ -179,7 +179,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
+@@ -153,8 +153,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
+@@ -167,28 +165,16 @@ warning: you do not have execution permission for" "\`$file'" >&2
        fi
-       [ $rc = 0 ] || result=1
+     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
++    0|2)
++      try_trace "$RTLD" "$file" || result=1
        ;;
 -    1)
 +    1|126)
        # This can be a non-ELF binary or no binary at all.
        nonelf "$file" || {
  	echo $"	not a dynamic executable"
+ 	result=1
+       }
+       ;;
+-    2)
+-      try_trace "$RTLD" "$file" || result=1
+-      ;;
+     *)
+       echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($ret)" >&2
+       exit 1
 

Deleted: glibc-package/trunk/debian/patches/any/local-ldd.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/local-ldd.diff	2009-11-08 20:28:57 UTC (rev 3941)
+++ glibc-package/trunk/debian/patches/any/local-ldd.diff	2009-11-08 20:59:20 UTC (rev 3942)
@@ -1,53 +0,0 @@
-# All lines beginning with `# DP:' are a description of the patch.
-# DP: Make ldd handle non-executable shared objects. Discard the error
-# DP: message if the kernel does not support one of the dynamic loaders.
-# DP: Updated by gotom, it's nice to merge to the upstream after my review.
-# Date: (Updated 2007-04-22 aurel32)
-
----
- elf/ldd.bash.in |   16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
---- a/elf/ldd.bash.in
-+++ b/elf/ldd.bash.in
-@@ -31,6 +31,7 @@
- warn=
- bind_now=
- verbose=
-+filename_magic_regex="((^|/)lib|.so$)"
- 
- while test $# -gt 0; do
-   case "$1" in
-@@ -153,13 +154,16 @@
-     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
-+    if test ! -x "$file" && eval echo "$file" \
-+	| egrep -v "$filename_magic_regex" > /dev/null; then
-+	echo 'ldd:' $"warning: you do not have execution permission for"\
-+	    "\`$file'" >&2
-+    fi
-     RTLD=
-     ret=1
-     for rtld in ${RTLDLIST}; do
-       if test -x $rtld; then
--	verify_out=`${rtld} --verify "$file"`
-+	verify_out=`${rtld} --verify "$file" 2>/dev/null`
-         ret=$?
- 	case $ret in
- 	[02]) RTLD=${rtld}; break;;
-@@ -171,7 +175,11 @@
-       # 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"
-+      if test -x "$file"; then
-+	try_trace "$file"
-+      else
-+	try_trace "${RTLD}" "$file"
-+      fi
-       rc=$?
-       if [ $rc = 5 ]; then
- 	try_trace "$RTLD" "$file"

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2009-11-08 20:28:57 UTC (rev 3941)
+++ glibc-package/trunk/debian/patches/series	2009-11-08 20:59:20 UTC (rev 3942)
@@ -154,7 +154,6 @@
 any/local-fhs-nscd.diff
 # any/local-ipv6-lookup.diff -p1               # has issues
 any/local-ld-multiarch.diff
-any/local-ldd.diff
 any/local-ldso-disable-hwcap.diff
 any/local-ldconfig.diff
 any/local-ldconfig-fsync.diff


Reply to: