commit:     4df34beb36448ed09e45779a0570bc0c2a070975
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  5 10:07:14 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Apr  5 10:07:14 2015 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=4df34beb

sys-apps/ldconfig: unconditionally add listed directories.

 sys-apps/ldconfig/files/ldconfig-0.1 | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/sys-apps/ldconfig/files/ldconfig-0.1 
b/sys-apps/ldconfig/files/ldconfig-0.1
index 55db851..722cbee 100644
--- a/sys-apps/ldconfig/files/ldconfig-0.1
+++ b/sys-apps/ldconfig/files/ldconfig-0.1
@@ -59,10 +59,9 @@ expand() {
                        line=${line//:/ }
                        line=${line//,/ }
                        for l in $line; do
-                               if [[ -d $l ]]; then
-                                       repeated $l $drs && continue
-                                       drs+=" $l "
-                               fi
+                               #We must add this whether or not the directory 
exists
+                               repeated $l $drs && continue
+                               drs+=" $l "
                        done
                done < $f
        done
@@ -112,12 +111,8 @@ sanitize() {
 
 get_options "$@"
 drs=$(read_ldso_conf "$LDSO_CONF")
-for f in $LDSO_CONF.d/*; do
-       drs="$drs $(read_ldso_conf "$f")"
-done
 drs=$(sanitize $drs)
 
-#LDSO_PATH=$(readelf -l /bin/bash | grep -o '\/lib\/ld-musl-.*\.so\.1')
 LDSO_PATH=$(ls /lib/ld-musl-*.so.1)
 if [[ ! -e $LDSO_PATH ]]; then
        echo "$LDSO_PATH not found" >&2

Reply via email to