[Pkg-nagios-devel] Bug#522812: nagios-plugins-basic: check_apt -c broken

Justin T Pryzby justinpryzby at users.sourceforge.net
Mon Apr 6 16:55:03 UTC 2009

Package: nagios-plugins-basic
Version: 1.4.12-5
Severity: normal

Commandline arguments -i -e and -c all cause add_to_regex() to be
called, thusly causing their associated arguments to begin with ^Inst.
That makes little sense, since the default regex for security updates
is: ^[^\(]*\([^ ]* (Debian-Security:|Ubuntu:[^/]*/[^-]*-security)

^Inst should be handled separately from the -[iec] options, otherwise
the user can cause weird things lines like /^Conf/ to be parsed
(incorrectly).  Either by doing another regcomp/regexec or
(preferably) just strncmp().

Even using -c '.*updates.*' doesn't allow most security updates to be
detected, since add_to_regex also suffixes the regex with a space.
The output of apt-get -n upgrade typically has no spaces after

It's advertized that -c may be specified multiples times.  Otherwise a
quck fix would be to change the parsing for that option to do just:

For the immediate future, I'm changing my local configurations to use:
"-c .*".

More information about the Pkg-nagios-devel mailing list