--- 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;