wok-current view squidguard/stuff/squidGuard-1.4_upgrade.patch @ rev 16931

xvkbd: fix koi8-r cyrillic font
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Sun Jul 20 09:20:37 2014 +0200 (2014-07-20)
parents
children
line source
1 diff -urN squidGuard-1.4.orig/src/main.c squidGuard-1.4.upgraded/src/main.c
2 --- squidGuard-1.4.orig/src/main.c 2013-12-11 17:42:15.000000000 +1300
3 +++ squidGuard-1.4.upgraded/src/main.c 2013-12-11 19:04:09.000000000 +1300
4 @@ -175,7 +175,7 @@
5 sgReloadConfig();
6 }
7 if(failsafe_mode) {
8 - puts("");
9 + puts("ERR message=\"squidGuard failsafe mode\"");
10 fflush(stdout);
11 if(sig_hup){
12 sgReloadConfig();
13 @@ -184,7 +184,7 @@
14 }
15 if(parseLine(buf,&squidInfo) != 1){
16 sgLogError("Error parsing squid line: %s",buf);
17 - puts("");
18 + puts("BH message=\"squidGuard error parsing squid line\"");
19 }
20 else {
21 src = Source;
22 @@ -196,14 +196,14 @@
23 acl = sgAclCheckSource(src);
24 if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
25 if(src == NULL || src->cont_search == 0){
26 - puts("");
27 + puts("ERR");
28 break;
29 } else
30 if(src->next != NULL){
31 src = src->next;
32 continue;
33 } else {
34 - puts("");
35 + puts("ERR");
36 break;
37 }
38 } else {
39 @@ -215,9 +215,10 @@
40 squidInfo.ident[0] = '-';
41 squidInfo.ident[1] = '\0';
42 }
43 - fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
44 - squidInfo.srcDomain,squidInfo.ident,
45 - squidInfo.method);
46 + if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
47 + fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
48 + } else
49 + fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
50 /* sgLogError("%s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method); */
51 break;
52 }
53 diff -urN squidGuard-1.4.orig/src/sgDiv.c squidGuard-1.4.upgraded/src/sgDiv.c
54 --- squidGuard-1.4.orig/src/sgDiv.c 2013-12-11 17:42:15.000000000 +1300
55 +++ squidGuard-1.4.upgraded/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 diff -urN squidGuard-1.4.orig/src/sgDiv.c.in squidGuard-1.4.upgraded/src/sgDiv.c.in
66 --- squidGuard-1.4.orig/src/sgDiv.c.in 2013-12-11 17:42:15.000000000 +1300
67 +++ squidGuard-1.4.upgraded/src/sgDiv.c.in 2013-12-11 18:58:40.000000000 +1300
68 @@ -782,7 +782,7 @@
69 }
70 sgLogError("Going into emergency mode");
71 while(fgets(buf, MAX_BUF, stdin) != NULL){
72 - puts("");
73 + puts("ERR");
74 fflush(stdout);
75 }
76 sgLogError("ending emergency mode, stdin empty");