summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-04-04 18:36:59 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-04-04 18:36:59 -0400
commit77ada7caca7d68e40cc8df6f026183474b250d4f (patch)
treee3378dd4006b4f7eb954be5b97a7139a36b73b66
parentc870f1968b7ca5ed33989498a434bf5849ebdfe4 (diff)
downloadhardened-dev-77ada7caca7d68e40cc8df6f026183474b250d4f.tar.gz
hardened-dev-77ada7caca7d68e40cc8df6f026183474b250d4f.tar.bz2
hardened-dev-77ada7caca7d68e40cc8df6f026183474b250d4f.tar.xz
hardened-dev-77ada7caca7d68e40cc8df6f026183474b250d4f.zip
sys-apps/ldconfig: Bug #545006.
Package-Manager: portage-2.2.14 Manifest-Sign-Key: 0xF52D4BBA
-rw-r--r--sys-apps/ldconfig/Manifest2
-rw-r--r--sys-apps/ldconfig/files/ldconfig-0.136
2 files changed, 19 insertions, 19 deletions
diff --git a/sys-apps/ldconfig/Manifest b/sys-apps/ldconfig/Manifest
index 7f09658..914406a 100644
--- a/sys-apps/ldconfig/Manifest
+++ b/sys-apps/ldconfig/Manifest
@@ -1,3 +1,3 @@
-AUX ldconfig-0.1 2384 SHA256 34b7aa7b217da740943e60c505b9fa5e6d383593560ec9291476ce98ef72cb12 SHA512 92367253158c729b626cc274b427d77ce16a0431f9aa869dd9c373d69a326614546cd2ea10674b6dffe2dadf355d24dcb52af5af85db46d1e48804e2a4e95c9f WHIRLPOOL 1630df84e40c782fb051229e3fb82fbc3a39acd93a7bce027350a11f4b04900b549483bbc0dc50fb3e641ceca03a4bdd4279e3c9daf4a8fdcb6d5da60c9b55b3
+AUX ldconfig-0.1 2421 SHA256 0535325eb80655f440b8ec00b0fb999408a1868c29eaf55708846b6b444fa4a7 SHA512 68aa55495a682cce893c0f8c0f12f3c8a483f22e24f1125e22582bd2bd94b23232160b26b236d45b499a709c2811d7b872e4b4453dcc679a03464218bdc8e652 WHIRLPOOL 83a4e8c01c3c2fe302e46695540c44b81df6e05094662b93a1fa359e13c4c62387322a9fa6053117dc98da5e2d1936382787f3461395fee718f09e2031eb720b
EBUILD ldconfig-0.1.ebuild 517 SHA256 593832e035c3ad57a26f13bba3618ed3a66c6ed38313cd4015568877c8dd93a4 SHA512 502cc0233b81e46e4f2e7b60dfd379ba4bc19d9a7718658903a26ae200ec073fb4e1a2b1463f0f77057f341820022eb2813360c5dfb7d694d78378276df71521 WHIRLPOOL 672d554bdaae63a5e728bd383ce841eb4c5c1ec1a9e09c4728f46d2d99c5aeea414b79b31ec113335572e3a8171d05407cbb7fefea53bf43d24b5d9198acdca8
MISC metadata.xml 238 SHA256 f13e6e7b65d20beb9ae945d520160ef0dba80c1965754958945904d7e3c0a75f SHA512 3c3d75f1cb90ffcfb98df47481fbde6d451254a29fa87577acd25bc27cbcc3e5dbc0c1efce5974be905428f0b7caf912c8b051417aff92763847fa377493a153 WHIRLPOOL 6ec3d597b87aff99014404b8b732e6f600aafc3c3eeebfab135c9c19cde2e43161cfa23f841bd72826cc3393b724e1dac115c15dcce2b74ace6f1d6ec209dbf3
diff --git a/sys-apps/ldconfig/files/ldconfig-0.1 b/sys-apps/ldconfig/files/ldconfig-0.1
index c5ec1df..55db851 100644
--- a/sys-apps/ldconfig/files/ldconfig-0.1
+++ b/sys-apps/ldconfig/files/ldconfig-0.1
@@ -10,16 +10,6 @@ fi
LDSO_CONF_DIR=$(dirname $LDSO_CONF)
-LDSO_PATH=$(ls /lib/ld-musl-*.so.1)
-if [[ ! -e $LDSO_PATH ]]; then
- echo "$LDSO_PATH not found" >&2
- exit 1
-fi
-
-LDSO_ARCH=$(basename $LDSO_PATH)
-LDSO_NAME=${LDSO_ARCH%.so.1}
-ETC_LDSO_PATH=/etc/${LDSO_NAME}.path
-
VERBOSE=0
get_options() {
@@ -33,7 +23,7 @@ get_options() {
ROOT=$OPTARG
;;
f)
- LDSOCONF=$OPTARG
+ LDSO_CONF=$OPTARG
;;
\?)
echo "Invalid option: -$opt" >&2
@@ -106,7 +96,7 @@ read_ldso_conf() {
fi
fi
done
- done < $LDSO_CONF
+ done < $1
echo $drs
}
@@ -121,16 +111,26 @@ sanitize() {
}
get_options "$@"
-drs=$(read_ldso_conf)
+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
+ exit 1
+fi
+
+LDSO_ARCH=$(basename $LDSO_PATH)
+LDSO_NAME=${LDSO_ARCH%.so.1}
+ETC_LDSO_PATH=/etc/${LDSO_NAME}.path
+
X=$(mktemp --tmpdir=/tmp ${LDSO_NAME}.XXXXXX)
-cat << EOF > $X
-# $ETC_LDSO_PATH autogenerated by env-update; make all changes to
-# contents of /etc/env.d directory
-EOF
for d in $drs; do
echo $d >> $X
done
+chmod 644 $X
mv $X $ETC_LDSO_PATH
-