From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 9663c20e2d8936845eff43137fb9108feae1f355
Date: Mon, 02 Jun 2014 01:44:32 +0200 [thread overview]
Message-ID: <20140601234432.EA0BF20341@argus.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 6425 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via 9663c20e2d8936845eff43137fb9108feae1f355 (commit)
via 7cc060415e17d65cb593fc6c62167f4f7fc2f55e (commit)
from bfb8d9b7f9a41c1b7d37a098f7b4e0ef30d701f3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9663c20e2d8936845eff43137fb9108feae1f355
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Mon Jun 2 01:42:44 2014 +0200
update accelerator: Adapt to new squid helper protocol.
commit 7cc060415e17d65cb593fc6c62167f4f7fc2f55e
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Mon Jun 2 00:54:19 2014 +0200
squidGuard: Update for new squid helper protocol.
-----------------------------------------------------------------------
Summary of changes:
config/rootfiles/core/78/filelists/files | 2 +
config/updxlrator/updxlrator | 10 +--
lfs/squidguard | 1 +
.../squidguard-1.4-squid-helper-protocol.patch | 75 ++++++++++++++++++++++
4 files changed, 84 insertions(+), 4 deletions(-)
create mode 100644 src/patches/squidguard-1.4-squid-helper-protocol.patch
Difference in files:
diff --git a/config/rootfiles/core/78/filelists/files b/config/rootfiles/core/78/filelists/files
index 6b9f795..fc6357c 100644
--- a/config/rootfiles/core/78/filelists/files
+++ b/config/rootfiles/core/78/filelists/files
@@ -9,6 +9,8 @@ srv/web/ipfire/cgi-bin/modem-status.cgi
srv/web/ipfire/cgi-bin/ovpnmain.cgi
srv/web/ipfire/cgi-bin/proxy.cgi
srv/web/ipfire/html/themes/ipfire/include/functions.pl
+usr/bin/squidGuard
+usr/sbin/updxlrator
usr/local/bin/setddns.pl
var/ipfire/langs
var/ipfire/menu.d/20-status.menu
diff --git a/config/updxlrator/updxlrator b/config/updxlrator/updxlrator
index 91ff8a9..2ddc6d8 100644
--- a/config/updxlrator/updxlrator
+++ b/config/updxlrator/updxlrator
@@ -70,7 +70,7 @@ while (<>) {
$username = $tmp[2]; if ($username eq '') { $username='-'; };
$method = $tmp[3];
- $xlrator_url = $source_url;
+ $xlrator_url = "";
if (($method eq 'GET') || ($method eq 'HEAD'))
{
@@ -212,9 +212,11 @@ while (<>) {
# ----------- ADD NEW SOURCES BEFORE THIS LINE !!! ------------------
}
- $request="$xlrator_url $hostaddr $username $method\n";
-
- print $request;
+ if ($xlrator_url) {
+ print "OK rewrite-url=\"$xlrator_url\"\n";
+ } else {
+ print "ERR\n";
+ }
}
# -------------------------------------------------------------------
diff --git a/lfs/squidguard b/lfs/squidguard
index c70a0d8..a48c25c 100644
--- a/lfs/squidguard
+++ b/lfs/squidguard
@@ -70,6 +70,7 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidguard-1.4-squid-helper-protocol.patch
cd $(DIR_APP) && ./configure --prefix=/usr --datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man \
--with-sg-config=/var/ipfire/urlfilter/squidGuard.conf \
diff --git a/src/patches/squidguard-1.4-squid-helper-protocol.patch b/src/patches/squidguard-1.4-squid-helper-protocol.patch
new file mode 100644
index 0000000..9806946
--- /dev/null
+++ b/src/patches/squidguard-1.4-squid-helper-protocol.patch
@@ -0,0 +1,75 @@
+http://bugs.squid-cache.org/show_bug.cgi?id=3978
+
+--- squidGuard-1.4.orig/src/main.c 2013-12-11 17:42:15.000000000 +1300
++++ squidGuard-1.4.orig/src/main.c 2013-12-11 19:04:09.000000000 +1300
+@@ -175,7 +175,7 @@
+ sgReloadConfig();
+ }
+ if(failsafe_mode) {
+- puts("");
++ puts("ERR message=\"squidGuard failsafe mode\"");
+ fflush(stdout);
+ if(sig_hup){
+ sgReloadConfig();
+@@ -184,7 +184,7 @@
+ }
+ if(parseLine(buf,&squidInfo) != 1){
+ sgLogError("Error parsing squid line: %s",buf);
+- puts("");
++ puts("BH message=\"squidGuard error parsing squid line\"");
+ }
+ else {
+ src = Source;
+@@ -196,14 +196,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 {
+@@ -215,9 +215,10 @@
+ squidInfo.ident[0] = '-';
+ squidInfo.ident[1] = '\0';
+ }
+- fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
+- squidInfo.srcDomain,squidInfo.ident,
+- squidInfo.method);
++ if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
++ fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
++ } else
++ fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
+ /* sgLogError("%s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method); */
+ break;
+ }
+--- squidGuard-1.4.orig/src/sgDiv.c 2013-12-11 17:42:15.000000000 +1300
++++ squidGuard-1.4.orig/src/sgDiv.c 2013-12-11 18:58:33.000000000 +1300
+@@ -771,7 +771,7 @@
+ }
+ sgLogError("Going into emergency mode");
+ while(fgets(buf, MAX_BUF, stdin) != NULL){
+- puts("");
++ puts("ERR");
+ fflush(stdout);
+ }
+ sgLogError("ending emergency mode, stdin empty");
+--- squidGuard-1.4.orig/src/sgDiv.c.in 2013-12-11 17:42:15.000000000 +1300
++++ squidGuard-1.4.orig/src/sgDiv.c.in 2013-12-11 18:58:40.000000000 +1300
+@@ -782,7 +782,7 @@
+ }
+ sgLogError("Going into emergency mode");
+ while(fgets(buf, MAX_BUF, stdin) != NULL){
+- puts("");
++ puts("ERR");
+ fflush(stdout);
+ }
+ sgLogError("ending emergency mode, stdin empty");
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2014-06-01 23:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140601234432.EA0BF20341@argus.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox