diff options
author | Oliver Eikemeier <eik@FreeBSD.org> | 2004-06-25 01:21:20 +0000 |
---|---|---|
committer | Oliver Eikemeier <eik@FreeBSD.org> | 2004-06-25 01:21:20 +0000 |
commit | 41c24e6c485a356550edbbabdb991fed7f5973fc (patch) | |
tree | 1a34698af0496c66c279ebaf5526379a92f92a7f /security/portaudit | |
parent | 8139d3292d708a40be02e2061ce658d5c715c181 (diff) | |
download | ports-41c24e6c485a356550edbbabdb991fed7f5973fc.tar.gz ports-41c24e6c485a356550edbbabdb991fed7f5973fc.zip |
Notes
Diffstat (limited to 'security/portaudit')
-rw-r--r-- | security/portaudit/Makefile | 2 | ||||
-rw-r--r-- | security/portaudit/files/portaudit-cmd.sh | 5 | ||||
-rw-r--r-- | security/portaudit/files/portaudit.functions | 25 |
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 |