mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 13:05:08 +00:00
audit-tmpdir hook: use abspath matching on RPATH entries
This ensures that RPATH entries like "/foo/build/bar" doesn't trigger a match when TMPDIR is "/build/bar". (I've had this problem with a prebuilt package.)
This commit is contained in:
parent
84162175a3
commit
ed0cee645f
@ -20,7 +20,7 @@ auditTmpdir() {
|
||||
if [[ "$i" =~ .build-id ]]; then continue; fi
|
||||
|
||||
if isELF "$i"; then
|
||||
if patchelf --print-rpath "$i" | grep -q -F "$TMPDIR/"; then
|
||||
if { printf :; patchelf --print-rpath "$i"; } | grep -q -F ":$TMPDIR/"; then
|
||||
echo "RPATH of binary $i contains a forbidden reference to $TMPDIR/"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user