]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/squidguard-1.4-squid-helper-protocol.patch
update Tor to 0.3.5.8
[people/pmueller/ipfire-2.x.git] / src / patches / squidguard-1.4-squid-helper-protocol.patch
1 http://bugs.squid-cache.org/show_bug.cgi?id=3978
2
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
5 @@ -175,7 +175,7 @@
6 sgReloadConfig();
7 }
8 if(failsafe_mode) {
9 - puts("");
10 + puts("ERR message=\"squidGuard failsafe mode\"");
11 fflush(stdout);
12 if(sig_hup){
13 sgReloadConfig();
14 @@ -184,7 +184,7 @@
15 }
16 if(parseLine(buf,&squidInfo) != 1){
17 sgLogError("Error parsing squid line: %s",buf);
18 - puts("");
19 + puts("BH message=\"squidGuard error parsing squid line\"");
20 }
21 else {
22 src = Source;
23 @@ -196,14 +196,14 @@
24 acl = sgAclCheckSource(src);
25 if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
26 if(src == NULL || src->cont_search == 0){
27 - puts("");
28 + puts("ERR");
29 break;
30 } else
31 if(src->next != NULL){
32 src = src->next;
33 continue;
34 } else {
35 - puts("");
36 + puts("ERR");
37 break;
38 }
39 } else {
40 @@ -215,9 +215,10 @@
41 squidInfo.ident[0] = '-';
42 squidInfo.ident[1] = '\0';
43 }
44 - fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
45 - squidInfo.srcDomain,squidInfo.ident,
46 - squidInfo.method);
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]);
49 + } else
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); */
52 break;
53 }
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
56 @@ -771,7 +771,7 @@
57 }
58 sgLogError("Going into emergency mode");
59 while(fgets(buf, MAX_BUF, stdin) != NULL){
60 - puts("");
61 + puts("ERR");
62 fflush(stdout);
63 }
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
67 @@ -782,7 +782,7 @@
68 }
69 sgLogError("Going into emergency mode");
70 while(fgets(buf, MAX_BUF, stdin) != NULL){
71 - puts("");
72 + puts("ERR");
73 fflush(stdout);
74 }
75 sgLogError("ending emergency mode, stdin empty");