wok-current diff squidguard/stuff/squidGuard-1.4_upgrade.patch @ rev 18483

Up slitaz-configs(263)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Oct 09 01:31:14 2015 +0300 (2015-10-09)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/squidguard/stuff/squidGuard-1.4_upgrade.patch	Fri Oct 09 01:31:14 2015 +0300
     1.3 @@ -0,0 +1,76 @@
     1.4 +diff -urN squidGuard-1.4.orig/src/main.c squidGuard-1.4.upgraded/src/main.c
     1.5 +--- squidGuard-1.4.orig/src/main.c	2013-12-11 17:42:15.000000000 +1300
     1.6 ++++ squidGuard-1.4.upgraded/src/main.c	2013-12-11 19:04:09.000000000 +1300
     1.7 +@@ -175,7 +175,7 @@
     1.8 + 	sgReloadConfig();
     1.9 +       }
    1.10 +       if(failsafe_mode) {
    1.11 +-	puts("");
    1.12 ++	puts("ERR message=\"squidGuard failsafe mode\"");
    1.13 + 	fflush(stdout);
    1.14 + 	if(sig_hup){
    1.15 +           sgReloadConfig();
    1.16 +@@ -184,7 +184,7 @@
    1.17 +       }
    1.18 +       if(parseLine(buf,&squidInfo) != 1){
    1.19 + 	sgLogError("Error parsing squid line: %s",buf);
    1.20 +-	puts("");
    1.21 ++	puts("BH message=\"squidGuard error parsing squid line\"");
    1.22 +       }
    1.23 +         else {
    1.24 + 	src = Source;
    1.25 +@@ -196,14 +196,14 @@
    1.26 + 	  acl = sgAclCheckSource(src);
    1.27 + 	  if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
    1.28 + 	    if(src == NULL || src->cont_search == 0){
    1.29 +-	      puts(""); 
    1.30 ++	      puts("ERR");
    1.31 + 	      break;
    1.32 + 	    } else
    1.33 + 	      if(src->next != NULL){
    1.34 + 		src = src->next;
    1.35 + 		continue;
    1.36 + 	      } else {
    1.37 +-		puts("");
    1.38 ++		puts("ERR");
    1.39 + 		break;
    1.40 + 	      }
    1.41 + 	  } else {
    1.42 +@@ -215,9 +215,10 @@
    1.43 + 	      squidInfo.ident[0] = '-';
    1.44 + 	      squidInfo.ident[1] = '\0';
    1.45 + 	    }
    1.46 +-	    fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
    1.47 +-		    squidInfo.srcDomain,squidInfo.ident,
    1.48 +-		    squidInfo.method);
    1.49 ++	    if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
    1.50 ++	      fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
    1.51 ++	    } else
    1.52 ++	      fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
    1.53 +             /* sgLogError("%s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method);  */
    1.54 + 	    break;
    1.55 + 	  }
    1.56 +diff -urN squidGuard-1.4.orig/src/sgDiv.c squidGuard-1.4.upgraded/src/sgDiv.c
    1.57 +--- squidGuard-1.4.orig/src/sgDiv.c	2013-12-11 17:42:15.000000000 +1300
    1.58 ++++ squidGuard-1.4.upgraded/src/sgDiv.c	2013-12-11 18:58:33.000000000 +1300
    1.59 +@@ -771,7 +771,7 @@
    1.60 +   }
    1.61 +   sgLogError("Going into emergency mode");
    1.62 +   while(fgets(buf, MAX_BUF, stdin) != NULL){
    1.63 +-    puts("");
    1.64 ++    puts("ERR");
    1.65 +     fflush(stdout);
    1.66 +   }
    1.67 +   sgLogError("ending emergency mode, stdin empty");
    1.68 +diff -urN squidGuard-1.4.orig/src/sgDiv.c.in squidGuard-1.4.upgraded/src/sgDiv.c.in
    1.69 +--- squidGuard-1.4.orig/src/sgDiv.c.in	2013-12-11 17:42:15.000000000 +1300
    1.70 ++++ squidGuard-1.4.upgraded/src/sgDiv.c.in	2013-12-11 18:58:40.000000000 +1300
    1.71 +@@ -782,7 +782,7 @@
    1.72 +   }
    1.73 +   sgLogError("Going into emergency mode");
    1.74 +   while(fgets(buf, MAX_BUF, stdin) != NULL){
    1.75 +-    puts("");
    1.76 ++    puts("ERR");
    1.77 +     fflush(stdout);
    1.78 +   }
    1.79 +   sgLogError("ending emergency mode, stdin empty");