summaryrefslogtreecommitdiffstats
path: root/web/attachments/268643-check_apt.c.patch
blob: e5893dc7ddbafddbe25b4a5fcd9f0af39a0ca407 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;