aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 31f7edb160e3..cc2553c688e8 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3589,7 +3589,11 @@ security-check: ${TMPPLIST}
# 4. startup scripts, in conjunction with 2.
# 5. world-writable files/dirs
#
- -@${RM} ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable ${WRKDIR}/.PLIST.objdump; \
+# The ${NONEXISTENT} argument of ${READELF} is there so that there are always
+# at least two file arguments, and forces it to always output the "File: foo"
+# header lines.
+#
+ -@${RM} ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable ${WRKDIR}/.PLIST.readelf; \
${AWK} -v prefix='${PREFIX}' ' \
match($$0, /^@cwd /) { prefix = substr($$0, RSTART + RLENGTH); if (prefix == "/") prefix=""; next; } \
/^@/ { next; } \
@@ -3602,10 +3606,10 @@ security-check: ${TMPPLIST}
| ${XARGS} -0 -J % ${FIND} % -prune -perm -0002 \! -type l 2> /dev/null > ${WRKDIR}/.PLIST.writable; \
${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \
| ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \
- | ${XARGS} -0 -n 1 ${OBJDUMP} -R 2> /dev/null > ${WRKDIR}/.PLIST.objdump; \
+ | ${XARGS} -0 ${READELF} -r ${NONEXISTENT} 2> /dev/null > ${WRKDIR}/.PLIST.readelf; \
if \
! ${AWK} -v audit="$${PORTS_AUDIT}" -f ${SCRIPTSDIR}/security-check.awk \
- ${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.objdump ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \
+ ${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.readelf ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \
then \
www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \
if [ ! -z "$${www_site}" ]; then \