From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/268643-check_apt.c.patch | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 web/attachments/268643-check_apt.c.patch (limited to 'web/attachments/268643-check_apt.c.patch') diff --git a/web/attachments/268643-check_apt.c.patch b/web/attachments/268643-check_apt.c.patch new file mode 100644 index 0000000..e5893dc --- /dev/null +++ b/web/attachments/268643-check_apt.c.patch @@ -0,0 +1,27 @@ +--- plugins/check_apt.c 2008-02-29 13:00:36.000000000 -0800 ++++ plugins/check_apt.new.c 2008-02-29 13:00:07.000000000 -0800 +@@ -57,7 +57,7 @@ + # define PATH_TO_APTGET "/usr/bin/apt-get" + #endif /* PATH_TO_APTGET */ + /* the RE that catches security updates */ +-#define SECURITY_RE "^[^\\(]*\\(.*[ ,](Debian-Security:|Ubuntu:[^/]*/[^-]*-security)" ++#define SECURITY_RE "^[^\\(]*\\([^ ]* (Debian-Security:|Ubuntu:[^/]*/[^-]*-security)" + + /* some standard functions */ + int process_arguments(int, char **); +@@ -354,13 +354,13 @@ + if(expr==NULL){ + re=malloc(sizeof(char)*(strlen("^Inst () ")+strlen(next)+1)); + if(!re) die(STATE_UNKNOWN, "malloc failed!\n"); +- sprintf(re, "^Inst (%s) ", next); ++ sprintf(re, "^Inst (%s)", next); + } else { + /* resize it, adding an extra char for the new '|' separator */ + re=realloc(expr, sizeof(char)*strlen(expr)+1+strlen(next)+1); + if(!re) die(STATE_UNKNOWN, "realloc failed!\n"); + /* append it starting at ')' in the old re */ +- sprintf((char*)(re+strlen(re)-2), "|%s) ", next); ++ sprintf((char*)(re+strlen(re)-2), "|%s)", next); + } + + return re; -- cgit v1.2.3-74-g34f1