Skip to content
Snippets Groups Projects
Commit 817db0ea authored by Natanael Copa's avatar Natanael Copa
Browse files

abuild: check for non-PIE suid files

fixes #955
parent 7759f5e5
No related branches found
No related tags found
No related merge requests found
......@@ -552,6 +552,15 @@ postcheck() {
warning "World writeable directories found:"
echo "$i"
fi
# check so we dont have any suid root binaries that are not
i=$(find "$dir" -type f -perm +6000 \
| xargs scanelf --nobanner --etype ET_EXEC \
| sed "s|ET_EXEC $dir|\t|")
if [ -n "$i" ]; then
error "Found non-PIE files that has SUID:"
echo "$i"
return 1
fi
return 0
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment