-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45ad7c5
commit a360c21
Showing
8 changed files
with
119 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
if [ -z $1 ]; then | ||
echo "Usage: $0 builddir" >&2; | ||
exit; | ||
fi | ||
|
||
which hardening-check >> /dev/null; | ||
if [ $? != "0" ]; then | ||
echo "hardening-check not found - on Ubuntu it is from the 'devscripts' package." >&2; | ||
exit; | ||
fi | ||
|
||
RET=0; | ||
|
||
for file in $1/bin/*; do | ||
case "$file" in | ||
*/urtrace) | ||
# This is a python script | ||
true;; | ||
*) | ||
hardening-check -q --nocfprotection --nofortify $file;; | ||
esac | ||
RET=$(($RET + $?)) | ||
done; | ||
|
||
for file in $1/lib/*.so; do | ||
case "$file" in | ||
*/libOpenCL*) | ||
# This is not built as part of UR | ||
true;; | ||
*/libzeCallMap.so | */libur_mock_headers.so) | ||
# Only used in testing, and are too simple for many of the hardening flags to have an effect. | ||
true;; | ||
*) | ||
hardening-check -q --nocfprotection --nofortify $file;; | ||
esac | ||
RET=$(($RET + $?)) | ||
done; | ||
|
||
if [ $RET != "0" ]; then | ||
exit 1; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters