1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 07:04:28 +00:00

Merge pull request #51317 from bjornfor/audit-tmpdir

audit-tmpdir hook: use abspath matching on RPATH entries
This commit is contained in:
John Ericson 2018-12-03 07:59:56 -05:00 committed by GitHub
commit 617c2a36eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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