Last active
July 15, 2017 06:00
-
-
Save gkoyuncu/f5aa69650fde60aa8ed0 to your computer and use it in GitHub Desktop.
squidguard 1.5b + squid 3.5.6 workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- src/main.c.in | |
+++ src/main.c.in | |
@@ -185,7 +185,7 @@ | |
sgReloadConfig(); | |
} | |
if(failsafe_mode) { | |
- puts(""); | |
+ puts("ERR"); | |
fflush(stdout); | |
if(sig_hup){ | |
sgReloadConfig(); | |
@@ -194,7 +194,7 @@ | |
} | |
if(parseLine(buf,&squidInfo) != 1){ | |
sgLogError("ERROR: Error parsing squid line: %s",buf); | |
- puts(""); | |
+ puts("ERR"); | |
} | |
else { | |
src = Source; | |
@@ -206,14 +206,14 @@ | |
acl = sgAclCheckSource(src); | |
if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){ | |
if(src == NULL || src->cont_search == 0){ | |
- puts(""); | |
+ puts("ERR"); | |
break; | |
} else | |
if(src->next != NULL){ | |
src = src->next; | |
continue; | |
} else { | |
- puts(""); | |
+ puts("ERR"); | |
break; | |
} | |
} else { | |
@@ -225,9 +225,12 @@ | |
squidInfo.ident[0] = '-'; | |
squidInfo.ident[1] = '\0'; | |
} | |
- fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src, | |
+ fprintf(stdout, "OK rewrite-url=\"%s\"\n", redirect); | |
+ /* | |
+ fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src, | |
squidInfo.srcDomain,squidInfo.ident, | |
squidInfo.method); | |
+ */ | |
/* sgLogDebug("DEBUG: %s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method); */ | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment