Revision: 6419 http://ipcop.svn.sourceforge.net/ipcop/?rev=6419&view=rev Author: dotzball Date: 2012-02-26 12:46:16 +0000 (Sun, 26 Feb 2012) Log Message: ----------- Patch squidGuard to accept parameter -f to force always output to stdout.
Modified Paths: -------------- ipcop/trunk/config/cfgroot/redirector-urlfilter ipcop/trunk/html/cgi-bin/urlfilter.cgi ipcop/trunk/lfs/squidGuard ipcop/trunk/src/patches/squidGuard-1.5-beta_stdout-always.patch Modified: ipcop/trunk/config/cfgroot/redirector-urlfilter =================================================================== --- ipcop/trunk/config/cfgroot/redirector-urlfilter 2012-02-26 12:31:07 UTC (rev 6418) +++ ipcop/trunk/config/cfgroot/redirector-urlfilter 2012-02-26 12:46:16 UTC (rev 6419) @@ -1,4 +1,4 @@ ENABLED=off ORDER=10 NAME=URL filter -CMD=/usr/bin/squidGuard +CMD=/usr/bin/squidGuard -f Modified: ipcop/trunk/html/cgi-bin/urlfilter.cgi =================================================================== --- ipcop/trunk/html/cgi-bin/urlfilter.cgi 2012-02-26 12:31:07 UTC (rev 6418) +++ ipcop/trunk/html/cgi-bin/urlfilter.cgi 2012-02-26 12:46:16 UTC (rev 6419) @@ -2667,9 +2667,9 @@ # write redirector config my %redirectorconf=(); - $redirectorconf{'NAME'} = "$Lang::tr{'url filter'}"; + $redirectorconf{'NAME'} = $Lang::tr{'url filter'}; $redirectorconf{'ORDER'} = 10; - $redirectorconf{'CMD'} = '/usr/bin/squidGuard'; + $redirectorconf{'CMD'} = '/usr/bin/squidGuard -f'; $redirectorconf{'ENABLED'} = $filtersettings{'ENABLED'}; &General::writehash("/var/ipcop/proxy/redirector/urlfilter", \%redirectorconf); @@ -2993,7 +2993,7 @@ print FILE <<END # Do not modify '/var/ipcop/proxy/squidGuard.conf' directly since any changes # you make will be overwritten whenever you resave URL filter settings using the -# web interface! +# web interface! logdir /var/log/squidGuard syslog enable Modified: ipcop/trunk/lfs/squidGuard =================================================================== --- ipcop/trunk/lfs/squidGuard 2012-02-26 12:31:07 UTC (rev 6418) +++ ipcop/trunk/lfs/squidGuard 2012-02-26 12:46:16 UTC (rev 6419) @@ -81,10 +81,8 @@ $(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xf $(DIR_DL)/$(DL_FILE) - #cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)_stdout-always.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)_stdout-always.patch - # Todo: URL filter CGI, modifications to proxy.cgi etc. - cd $(DIR_APP) && ./configure --with-squiduser=squid \ --prefix=/usr \ --with-sg-config=/var/ipcop/proxy/squidGuard.conf \ Modified: ipcop/trunk/src/patches/squidGuard-1.5-beta_stdout-always.patch =================================================================== --- ipcop/trunk/src/patches/squidGuard-1.5-beta_stdout-always.patch 2012-02-26 12:31:07 UTC (rev 6418) +++ ipcop/trunk/src/patches/squidGuard-1.5-beta_stdout-always.patch 2012-02-26 12:46:16 UTC (rev 6419) @@ -1,16 +1,41 @@ original input to stdout, to be useable with multiple redirectors +when option -f is given on squidGuard start --- a/src/main.c.in 2009-09-27 21:41:50.000000000 +0200 -+++ b/src/main.c.in 2012-02-11 23:17:43.000000000 +0100 -@@ -206,14 +206,19 @@ ++++ b/src/main.c.in 2012-02-25 21:13:20.000000000 +0100 +@@ -59,6 +59,7 @@ + char **globalEnvp ; + int globalDebugTimeDelta = 0; + int globalDebug = 0; ++int globalFullStdout = 0; + int globalPid = 0; + int globalUpdate = 0; + int passthrough = 0; +@@ -101,11 +102,14 @@ + #ifdef USE_SYSLOG + openlog("squidGuard", LOG_PID | LOG_NDELAY | LOG_CONS, LOG_@LOGFAC@); + #endif +- while ((ch = getopt(argc, argv, "hbduPC:t:c:v")) != EOF) ++ while ((ch = getopt(argc, argv, "hbdfuPC:t:c:v")) != EOF) + switch (ch) { + case 'd': + globalDebug = 1; + break; ++ case 'f': ++ globalFullStdout = 1; ++ break; + case 'c': + configFile = optarg; + break; +@@ -206,14 +210,19 @@ acl = sgAclCheckSource(src); if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){ if(src == NULL || src->cont_search == 0){ - puts(""); -+ if (0) { ++ if (globalFullStdout) { + fprintf(stdout, "%s %s/%s %s %s\n", squidInfo.orig, squidInfo.src, squidInfo.srcDomain, squidInfo.ident, squidInfo.method); + } + else { -+ puts(""); ++ puts(""); + } break; } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn