summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2013-05-06 17:42:47 +0200
committerJuergen Daubert <jue@jue.li>2013-05-06 17:42:47 +0200
commit096c931b873e1e021d45c10d49165c4b6d5e726b (patch)
tree40a423ea97a56c2310e2629f80b461d474f5af59
parent7aaba516426a8f831d7b8dc997555906cdba1b19 (diff)
downloadprt-utils-096c931b873e1e021d45c10d49165c4b6d5e726b.tar.gz
prt-utils-096c931b873e1e021d45c10d49165c4b6d5e726b.tar.xz
finddeps: use realpath to sanitize filepaths like /usr/lib64 or /usr/lib/../lib
-rw-r--r--CHANGES5
-rwxr-xr-xfinddeps4
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 2037dda..86a156f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+0.9.5 -> 0.9.6
+--------------
+- finddeps: use realpath to sanitize filepaths like /usr/lib/../lib
+ or /usr/lib64
+
0.9.4 -> 0.9.5
--------------
- prtsweep: add .32bit to the files to keep
diff --git a/finddeps b/finddeps
index e79a2ea..90584fb 100755
--- a/finddeps
+++ b/finddeps
@@ -5,7 +5,7 @@
# Johannes Winkelmann <jw at tks6 dot net>
# awk stuff by Juergen Daubert <jue at jue dot li>
-version=1.9
+version=1.9.1
pkgdb="/var/lib/pkg/db"
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11/lib:$LD_LIBRARY_PATH
@@ -19,7 +19,7 @@ function printDep() {
fi
done
- deps=(`for t in ${deps[*]}; do echo $t; done|sort|uniq`)
+ deps=(`for t in ${deps[*]}; do realpath $t; done|sort|uniq`)
for d in ${deps[*]}; do
awk -v s="$d" -v RS="" '$0 ~ substr(s,2) {print $1}' $pkgdb

Generated by cgit