summaryrefslogtreecommitdiff
path: root/Mk/Scripts
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2018-06-30 08:37:33 +0000
committerMathieu Arnold <mat@FreeBSD.org>2018-06-30 08:37:33 +0000
commit1ac9d4e91f8fba7fd6b29b6251583da0c6187e2d (patch)
treebe77b9dd3a234b46d65aeb6acca209b76593c1b6 /Mk/Scripts
parent- Switch to new test framework (diff)
Convert to readelf.
objdump is being removed from HEAD, make sure everything still works when this happens. PR: 229049 Reported by: emaste Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D15904
Notes
Notes: svn path=/head/; revision=473605
Diffstat (limited to 'Mk/Scripts')
-rw-r--r--Mk/Scripts/security-check.awk14
1 files changed, 7 insertions, 7 deletions
diff --git a/Mk/Scripts/security-check.awk b/Mk/Scripts/security-check.awk
index 60c6ce791019..4a661bbc7f99 100644
--- a/Mk/Scripts/security-check.awk
+++ b/Mk/Scripts/security-check.awk
@@ -11,17 +11,17 @@ FILENAME ~ /\.flattened$/ {
if ($0 ~ /(^|\/)etc\/rc\.d\//)
startup_scripts[$0] = 1;
}
-FILENAME ~ /\.objdump$/ {
- if (match($0, /: +file format [^ ]+$/)) {
- file = substr($0, 1, RSTART - 1);
+FILENAME ~ /\.readelf$/ {
+ if (match($0, /^File:/)) {
+ file = substr($0, 7);
next;
}
if (file == "")
next;
- if ($3 ~ /^(gets|mktemp|tempnam|tmpnam)$/ ||
- ($3 ~ /^(strcpy|strcat|sprintf)$/ && audit != ""))
- stupid_binaries[file] = stupid_binaries[file] " " $3;
- if ($3 ~ /^(accept|recvfrom)$/)
+ if ($5 ~ /^(gets|mktemp|tempnam|tmpnam)$/ ||
+ ($5 ~ /^(strcpy|strcat|sprintf)$/ && audit != ""))
+ stupid_binaries[file] = stupid_binaries[file] " " $5;
+ if ($5 ~ /^(accept|recvfrom)$/)
network_binaries[file] = 1;
}
FILENAME ~ /\.setuid$/ { setuid_binaries[$0] = 1; }