1 http://bugs.squid-cache.org/show_bug.cgi?id=3978
3 --- squidGuard-1.4.orig/src/main.c 2013-12-11 17:42:15.000000000 +1300
4 +++ squidGuard-1.4.orig/src/main.c 2013-12-11 19:04:09.000000000 +1300
10 + puts("ERR message=\"squidGuard failsafe mode\"");
16 if(parseLine(buf,&squidInfo) != 1){
17 sgLogError("Error parsing squid line: %s",buf);
19 + puts("BH message=\"squidGuard error parsing squid line\"");
24 acl = sgAclCheckSource(src);
25 if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
26 if(src == NULL || src->cont_search == 0){
31 if(src->next != NULL){
41 squidInfo.ident[0] = '-';
42 squidInfo.ident[1] = '\0';
44 - fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
45 - squidInfo.srcDomain,squidInfo.ident,
47 + if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
48 + fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
50 + fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
51 /* sgLogError("%s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method); */
54 --- squidGuard-1.4.orig/src/sgDiv.c 2013-12-11 17:42:15.000000000 +1300
55 +++ squidGuard-1.4.orig/src/sgDiv.c 2013-12-11 18:58:33.000000000 +1300
58 sgLogError("Going into emergency mode");
59 while(fgets(buf, MAX_BUF, stdin) != NULL){
64 sgLogError("ending emergency mode, stdin empty");
65 --- squidGuard-1.4.orig/src/sgDiv.c.in 2013-12-11 17:42:15.000000000 +1300
66 +++ squidGuard-1.4.orig/src/sgDiv.c.in 2013-12-11 18:58:40.000000000 +1300
69 sgLogError("Going into emergency mode");
70 while(fgets(buf, MAX_BUF, stdin) != NULL){
75 sgLogError("ending emergency mode, stdin empty");