wok-current annotate squidguard/stuff/squidGuard-1.4_upgrade.patch @ rev 23659

updated sord (0.16.2 -> 0.16.4)
author Hans-G?nter Theisgen
date Wed Apr 22 09:04:19 2020 +0100 (2020-04-22)
parents
children
rev   line source
erjo@16710 1 diff -urN squidGuard-1.4.orig/src/main.c squidGuard-1.4.upgraded/src/main.c
erjo@16710 2 --- squidGuard-1.4.orig/src/main.c 2013-12-11 17:42:15.000000000 +1300
erjo@16710 3 +++ squidGuard-1.4.upgraded/src/main.c 2013-12-11 19:04:09.000000000 +1300
erjo@16710 4 @@ -175,7 +175,7 @@
erjo@16710 5 sgReloadConfig();
erjo@16710 6 }
erjo@16710 7 if(failsafe_mode) {
erjo@16710 8 - puts("");
erjo@16710 9 + puts("ERR message=\"squidGuard failsafe mode\"");
erjo@16710 10 fflush(stdout);
erjo@16710 11 if(sig_hup){
erjo@16710 12 sgReloadConfig();
erjo@16710 13 @@ -184,7 +184,7 @@
erjo@16710 14 }
erjo@16710 15 if(parseLine(buf,&squidInfo) != 1){
erjo@16710 16 sgLogError("Error parsing squid line: %s",buf);
erjo@16710 17 - puts("");
erjo@16710 18 + puts("BH message=\"squidGuard error parsing squid line\"");
erjo@16710 19 }
erjo@16710 20 else {
erjo@16710 21 src = Source;
erjo@16710 22 @@ -196,14 +196,14 @@
erjo@16710 23 acl = sgAclCheckSource(src);
erjo@16710 24 if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
erjo@16710 25 if(src == NULL || src->cont_search == 0){
erjo@16710 26 - puts("");
erjo@16710 27 + puts("ERR");
erjo@16710 28 break;
erjo@16710 29 } else
erjo@16710 30 if(src->next != NULL){
erjo@16710 31 src = src->next;
erjo@16710 32 continue;
erjo@16710 33 } else {
erjo@16710 34 - puts("");
erjo@16710 35 + puts("ERR");
erjo@16710 36 break;
erjo@16710 37 }
erjo@16710 38 } else {
erjo@16710 39 @@ -215,9 +215,10 @@
erjo@16710 40 squidInfo.ident[0] = '-';
erjo@16710 41 squidInfo.ident[1] = '\0';
erjo@16710 42 }
erjo@16710 43 - fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
erjo@16710 44 - squidInfo.srcDomain,squidInfo.ident,
erjo@16710 45 - squidInfo.method);
erjo@16710 46 + if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
erjo@16710 47 + fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
erjo@16710 48 + } else
erjo@16710 49 + fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
erjo@16710 50 /* sgLogError("%s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method); */
erjo@16710 51 break;
erjo@16710 52 }
erjo@16710 53 diff -urN squidGuard-1.4.orig/src/sgDiv.c squidGuard-1.4.upgraded/src/sgDiv.c
erjo@16710 54 --- squidGuard-1.4.orig/src/sgDiv.c 2013-12-11 17:42:15.000000000 +1300
erjo@16710 55 +++ squidGuard-1.4.upgraded/src/sgDiv.c 2013-12-11 18:58:33.000000000 +1300
erjo@16710 56 @@ -771,7 +771,7 @@
erjo@16710 57 }
erjo@16710 58 sgLogError("Going into emergency mode");
erjo@16710 59 while(fgets(buf, MAX_BUF, stdin) != NULL){
erjo@16710 60 - puts("");
erjo@16710 61 + puts("ERR");
erjo@16710 62 fflush(stdout);
erjo@16710 63 }
erjo@16710 64 sgLogError("ending emergency mode, stdin empty");
erjo@16710 65 diff -urN squidGuard-1.4.orig/src/sgDiv.c.in squidGuard-1.4.upgraded/src/sgDiv.c.in
erjo@16710 66 --- squidGuard-1.4.orig/src/sgDiv.c.in 2013-12-11 17:42:15.000000000 +1300
erjo@16710 67 +++ squidGuard-1.4.upgraded/src/sgDiv.c.in 2013-12-11 18:58:40.000000000 +1300
erjo@16710 68 @@ -782,7 +782,7 @@
erjo@16710 69 }
erjo@16710 70 sgLogError("Going into emergency mode");
erjo@16710 71 while(fgets(buf, MAX_BUF, stdin) != NULL){
erjo@16710 72 - puts("");
erjo@16710 73 + puts("ERR");
erjo@16710 74 fflush(stdout);
erjo@16710 75 }
erjo@16710 76 sgLogError("ending emergency mode, stdin empty");