aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/portaudit/Makefile2
-rw-r--r--security/portaudit/files/portaudit-cmd.sh5
-rw-r--r--security/portaudit/files/portaudit.functions25
3 files changed, 30 insertions, 2 deletions
diff --git a/security/portaudit/Makefile b/security/portaudit/Makefile
index dfd4f458b03c..894f69463c6d 100644
--- a/security/portaudit/Makefile
+++ b/security/portaudit/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= portaudit
-PORTVERSION= 0.4
+PORTVERSION= 0.4.1
CATEGORIES= security
DISTFILES=
diff --git a/security/portaudit/files/portaudit-cmd.sh b/security/portaudit/files/portaudit-cmd.sh
index 54c1f02952ec..99fdcbde8bbd 100644
--- a/security/portaudit/files/portaudit-cmd.sh
+++ b/security/portaudit/files/portaudit-cmd.sh
@@ -151,3 +151,8 @@ if [ -n "$opt_file" ]; then
portaudit_prerequisites
audit_file "$opt_file"
fi
+
+if [ $# -gt 0 ]; then
+ portaudit_prerequisites
+ audit_args "$@"
+fi
diff --git a/security/portaudit/files/portaudit.functions b/security/portaudit/files/portaudit.functions
index f3b6e21db458..af9dfe3d086f 100644
--- a/security/portaudit/files/portaudit.functions
+++ b/security/portaudit/files/portaudit.functions
@@ -186,7 +186,7 @@ audit_file()
close(cmd)
}
END {
- print vul " problem(s) in found."
+ print vul " problem(s) found."
if (vul > 0) {
exit(1)
}
@@ -194,6 +194,29 @@ audit_file()
'
}
+audit_args()
+{
+ VULCNT=0
+ while [ $# -gt 0 ]; do
+ if VLIST=`extract_auditfile | /usr/bin/grep -v '^#' | ${PKG_VERSION} -T "${1}" -`; then
+ VULCNT=$((${VULCNT}+1))
+ echo "${VLIST}" | /usr/bin/awk -F\| '{
+ print "Affected package: '${1}' (matched by " $1 ")"
+ print "Type of problem: " $3 "."
+ split($2, ref, / /)
+ for (r in ref)
+ print "Reference: <" ref[r] ">"
+ print ""
+ }'
+ fi
+ shift
+ done
+ echo "${VULCNT} problem(s) found."
+ if [ ${VULCNT} -gt 0 ]; then
+ return 1
+ fi
+}
+
audit_cwd()
{
if [ ! -r "Makefile" ]; then