summaryrefslogtreecommitdiffstats
path: root/web/attachments/268643-check_apt.c.patch
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/268643-check_apt.c.patch
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/268643-check_apt.c.patch')
-rw-r--r--web/attachments/268643-check_apt.c.patch27
1 files changed, 27 insertions, 0 deletions
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 @@
1--- plugins/check_apt.c 2008-02-29 13:00:36.000000000 -0800
2+++ plugins/check_apt.new.c 2008-02-29 13:00:07.000000000 -0800
3@@ -57,7 +57,7 @@
4 # define PATH_TO_APTGET "/usr/bin/apt-get"
5 #endif /* PATH_TO_APTGET */
6 /* the RE that catches security updates */
7-#define SECURITY_RE "^[^\\(]*\\(.*[ ,](Debian-Security:|Ubuntu:[^/]*/[^-]*-security)"
8+#define SECURITY_RE "^[^\\(]*\\([^ ]* (Debian-Security:|Ubuntu:[^/]*/[^-]*-security)"
9
10 /* some standard functions */
11 int process_arguments(int, char **);
12@@ -354,13 +354,13 @@
13 if(expr==NULL){
14 re=malloc(sizeof(char)*(strlen("^Inst () ")+strlen(next)+1));
15 if(!re) die(STATE_UNKNOWN, "malloc failed!\n");
16- sprintf(re, "^Inst (%s) ", next);
17+ sprintf(re, "^Inst (%s)", next);
18 } else {
19 /* resize it, adding an extra char for the new '|' separator */
20 re=realloc(expr, sizeof(char)*strlen(expr)+1+strlen(next)+1);
21 if(!re) die(STATE_UNKNOWN, "realloc failed!\n");
22 /* append it starting at ')' in the old re */
23- sprintf((char*)(re+strlen(re)-2), "|%s) ", next);
24+ sprintf((char*)(re+strlen(re)-2), "|%s)", next);
25 }
26
27 return re;