summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 51b4a6a..ad1adc2 100755
--- a/abuild.in
+++ b/abuild.in
@@ -1039,13 +1039,21 @@ find_scanelf_paths() {
scan_shared_objects() {
local name="$1" controldir="$2" datadir="$3"
- local opt=
+ local opt= i=
# allow spaces in paths
IFS=:
set -- $(find_scanelf_paths "$datadir")
unset IFS
+ # sanity check, verify that each path is prefixed with datadir
+ for i; do
+ if [ "${i#$datadir}" = "$i" ]; then
+ error "Internal error in scanelf paths"
+ return 1
+ fi
+ done
+
if options_has "ldpath-recursive"; then
opt="--recursive"
fi