1
0
Fork 0
forked from mirrors/openup

Better output in cron mode.

e.g.

--- nginx ---
Available update(s): 1.3.5p2 1.2.3p2 nginx: A problem exists in
nginx if proxy_pass is used with untrusted HTTP backend servers.
The problem may lead to a denial of service or a disclosure of a
worker process memory on a specially crafted response from an
upstream proxied server.
This commit is contained in:
Antoine Jacoutot 2013-09-04 15:37:13 +02:00
commit a8da62da50

7
openup
View file

@ -37,7 +37,7 @@ usage() {
echo "Usage: ${0##*/} [-K][-Sn|c]" >&2 echo "Usage: ${0##*/} [-K][-Sn|c]" >&2
echo echo
echo "Options:" echo "Options:"
echo " -K do not check for kernel binpatches (when running non GENERIC)" echo " -K do not check for kernel binpatches (when running non GENERIC) - NOT YET"
echo " -S do not check for package signatures" echo " -S do not check for package signatures"
echo " -n dry-run mode, no modification is done" echo " -n dry-run mode, no modification is done"
echo echo
@ -50,7 +50,7 @@ pr_error() {
} }
if [ "$(id -u)" -ne 0 ]; then if [ "$(id -u)" -ne 0 ]; then
pr_error "need root privileges to run this script" pr_error "Need root privileges to run this script"
usage usage
fi fi
@ -185,7 +185,8 @@ check_vuxml() {
for p in ${_BP_OUTDATED} ${_PKG_OUTDATED} for p in ${_BP_OUTDATED} ${_PKG_OUTDATED}
do do
pr_bigarrow "${p} <" echo "--- ${p} ---\n"
echo "Available update(s): "
# XXX how do we print only the 1st matching range in awk? # XXX how do we print only the 1st matching range in awk?
awk "/<name>${p}<\/name>/,/<\/vuln>/" ${_TMPVUXML} | \ awk "/<name>${p}<\/name>/,/<\/vuln>/" ${_TMPVUXML} | \
sed '/<\/vuln>/,$d' | \ sed '/<\/vuln>/,$d' | \