public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/hardened-dev:musl commit in: sys-apps/ldconfig/files/
@ 2015-04-04 22:35 Anthony G. Basile
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony G. Basile @ 2015-04-04 22:35 UTC (permalink / raw
  To: gentoo-commits

commit:     77ada7caca7d68e40cc8df6f026183474b250d4f
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  4 22:36:59 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Apr  4 22:36:59 2015 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=77ada7ca

sys-apps/ldconfig: Bug #545006.

Package-Manager: portage-2.2.14
Manifest-Sign-Key: 0xF52D4BBA

 sys-apps/ldconfig/files/ldconfig-0.1 | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

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
-


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/hardened-dev:musl commit in: sys-apps/ldconfig/files/
@ 2015-04-05 10:05 Anthony G. Basile
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony G. Basile @ 2015-04-05 10:05 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/hardened-dev:musl commit in: sys-apps/ldconfig/files/
@ 2015-04-15 20:47 Anthony G. Basile
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony G. Basile @ 2015-04-15 20:47 UTC (permalink / raw
  To: gentoo-commits

commit:     bbd671043a9d7b666e3cc750b771f6b5105d5064
Author:     layman <layman <AT> localhost>
AuthorDate: Wed Apr 15 20:41:02 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Apr 15 20:49:24 2015 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=bbd67104

sys-apps/ldconfig: Ignore -p. Expect -X. Bug #545006 c#17.

 sys-apps/ldconfig/files/ldconfig-0.1 | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/sys-apps/ldconfig/files/ldconfig-0.1 b/sys-apps/ldconfig/files/ldconfig-0.1
index 722cbee..7139450 100644
--- a/sys-apps/ldconfig/files/ldconfig-0.1
+++ b/sys-apps/ldconfig/files/ldconfig-0.1
@@ -12,6 +12,8 @@ LDSO_CONF_DIR=$(dirname $LDSO_CONF)
 
 VERBOSE=0
 
+UPDATE_LINKS=1
+
 get_options() {
 	while getopts "vnNXf:C:r:p" opt "$@"; do
 		case $opt in
@@ -25,18 +27,26 @@ get_options() {
 		f)
 			LDSO_CONF=$OPTARG
 			;;
+		X)
+			UPDATE_LINKS=0
+			;;
 		\?)
 			echo "Invalid option: -$opt" >&2
 			exit 1
 			;;
-		n|N|X|C)
+		n|N|C|p)
 			echo "Unimplemented option: -$opt" >&2
 			exit 1
 			;;
 		esac
 	done
+
+	if [[ $UPDATE_LINKS == 1 ]]; then
+		echo "Updating links is not implemented."
+	fi
 }
 
+
 repeated() {
 	local l=$1
 	local drs="${@:2}"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-15 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-15 20:47 [gentoo-commits] proj/hardened-dev:musl commit in: sys-apps/ldconfig/files/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2015-04-05 10:05 Anthony G. Basile
2015-04-04 22:35 Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox