1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-15 07:56:36 +00:00

update to version 0.4.1

Use
  portaudit [packagename ...]
to check if package is listed as vulnerable
This commit is contained in:
Oliver Eikemeier 2004-06-25 01:21:20 +00:00
parent 8139d3292d
commit 41c24e6c48
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=112185
6 changed files with 60 additions and 4 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= portaudit
PORTVERSION= 0.4
PORTVERSION= 0.4.1
CATEGORIES= security
DISTFILES=

View File

@ -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

View File

@ -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

View File

@ -6,7 +6,7 @@
#
PORTNAME= portaudit
PORTVERSION= 0.4
PORTVERSION= 0.4.1
CATEGORIES= security
DISTFILES=

View File

@ -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

View File

@ -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