mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
squidclamav: Remove package from IPFire as agreed in dev video call 3rd Jul 2023
- Removal of lfs file - Removal of rootfile - Removal of backup includes file - Removal of three patches - Removal of paks files - Adjustment of make.sh to remove squidclamav Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
bf99f427ca
commit
a6039dc9d1
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
extract_files
|
||||
restore_backup ${NAME}
|
||||
/etc/init.d/squid restart
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
/etc/init.d/squid stop
|
||||
make_backup ${NAME}
|
||||
remove_files
|
||||
/etc/init.d/squid start
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2010 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
./uninstall.sh
|
||||
extract_files
|
||||
|
||||
VERSION=$(cat /opt/pakfire/db/installed/meta-squidclamav | grep Release | cut -d" " -f2)
|
||||
|
||||
if [ "$VERSION" -gt "10" ]; then
|
||||
restore_backup ${NAME}
|
||||
fi
|
||||
|
||||
if [ "$VERSION" -lt "11" ]; then
|
||||
sed -e "s|logfile.*|logfile /var/log/squid/squidclamav.log|g" /etc/squidclamav.conf
|
||||
fi
|
||||
|
||||
if [ "$VERSION" -lt "16" ]; then
|
||||
sed -i /etc/squidclamav.conf \
|
||||
-e "s/proxy none//g" \
|
||||
-e "s/^#squid_ip 127\.0\.0\.1/squid_ip 127\.0\.0\.1/g" \
|
||||
-e "s/^#squid_port 3128/squid_port 800/g" \
|
||||
-e "s/^#trust_cache 1/trust_cache 1/g"
|
||||
|
||||
# Fix permissions.
|
||||
chmod 664 /etc/squidclamav.conf
|
||||
chown root.nobody /etc/squidclamav.conf
|
||||
|
||||
# Regenerate configuration files.
|
||||
perl /srv/web/ipfire/cgi-bin/proxy.cgi
|
||||
fi
|
||||
|
||||
/etc/init.d/squid restart
|
||||
@@ -1,13 +0,0 @@
|
||||
diff -Nur a/src/squidclamav.c b/src/squidclamav.c
|
||||
--- a/src/squidclamav.c 2012-10-29 09:46:06.000000000 +0100
|
||||
+++ b/src/squidclamav.c 2013-07-06 19:10:56.375292374 +0200
|
||||
@@ -413,6 +413,9 @@
|
||||
/* Suppress error: SSL certificate problem, verify that the CA cert is OK */
|
||||
curl_easy_setopt (eh, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_easy_setopt (eh, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
+
|
||||
+ /* Prevent squidclamav from using IPv6 - fix by Nico Prenzel */
|
||||
+ curl_easy_setopt (eh, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||
}
|
||||
}
|
||||
/* create a squidguard child process and setup pipes */
|
||||
@@ -1,13 +0,0 @@
|
||||
--- squidclamav-5.11/src/pattern.c~ 2014-10-29 13:08:05.658143495 +0000
|
||||
+++ squidclamav-5.11/src/pattern.c 2014-10-29 13:08:20.964642365 +0000
|
||||
@@ -151,10 +151,6 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
- /* extract source ipaddress and source fqdn */
|
||||
- if (parseSourceAddress(in_buff.src_address, "/") != 0) {
|
||||
- }
|
||||
-
|
||||
if (debug != 0)
|
||||
logit(log_file, "DEBUG Parsed request: %s %s/%s %s %s\n", in_buff.url, in_buff.ipaddress, in_buff.fqdn, in_buff.ident, in_buff.method);
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
diff -Naur squidclamav-5.11.org/src/squidclamav.c squidclamav-5.11/src/squidclamav.c
|
||||
--- squidclamav-5.11.org/src/squidclamav.c 2012-10-29 09:46:06.000000000 +0100
|
||||
+++ squidclamav-5.11/src/squidclamav.c 2014-06-03 12:26:36.215696508 +0200
|
||||
@@ -483,7 +483,7 @@
|
||||
aren't appropriate, then just echo back the line from stdin */
|
||||
if (buff_status == 1) {
|
||||
logit(log_file, "DEBUG Invalid input buffer, aborting: %s\n", sbuff);
|
||||
- puts("");
|
||||
+ puts("BH message=\"Invalid input buffer\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -496,7 +496,7 @@
|
||||
logit(log_file, "DEBUG No squidguard and no antivir check (TRUSTUSER match) for user: %s\n", in_buff.ident);
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"TRUSTUSER match\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -508,7 +508,7 @@
|
||||
logit(log_file, "DEBUG No squidguard and no antivir check (TRUSTCLIENT match) for address: %s/%s\n",in_buff.ipaddress, in_buff.fqdn);
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"TRUSTCLIENT match\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -520,7 +520,7 @@
|
||||
logit(log_file, "DEBUG No squidguard and no antivir check (WHITELIST match) for url: %s\n", in_buff.url);
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"WHITLIST match\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -536,7 +536,7 @@
|
||||
if ((sockd = dconnect ()) < 0)
|
||||
{
|
||||
logit(log_file, "ERROR Can't connect to Clamd daemon, fallback to Squid.\n");
|
||||
- puts("");
|
||||
+ puts("BH message=\"Cannot connect to clamd\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -546,7 +546,7 @@
|
||||
if (write (sockd, "zINSTREAM", 10) <= 0)
|
||||
{
|
||||
logit(log_file, "ERROR Can't write to Clamd socket.\n");
|
||||
- puts("");
|
||||
+ puts("BG message=\"Cannot write to clamd socket\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -614,8 +614,7 @@
|
||||
logit(log_file, "Squid Cache purged of url %s.\n", in_buff.url);
|
||||
}
|
||||
}
|
||||
- fprintf (stdout, "%s %s %s %s\n", urlredir,
|
||||
- in_buff.src_address, in_buff.ident, in_buff.method);
|
||||
+ fprintf (stdout, "OK rewrite-url=\"%s\"\n", urlredir);
|
||||
fflush(stdout);
|
||||
xfree(urlredir);
|
||||
if (debug != 0)
|
||||
@@ -675,7 +674,7 @@
|
||||
continue operation (so that Squid still works!),
|
||||
we simply echo stdin to stdout - i.e. "bridge mode" :-) */
|
||||
if (bridge_mode == 1) {
|
||||
- puts("");
|
||||
+ puts("ERR message=\"brigde mode\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -685,7 +684,7 @@
|
||||
if (buff_status == -1) {
|
||||
if (debug > 2)
|
||||
logit(log_file, "DEBUG method is not GET skipping virus scan.\n");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"method is not GET skipping virus scan\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -699,7 +698,7 @@
|
||||
timeit(g_start, "Total");
|
||||
|
||||
/* no replacement for the URL was found */
|
||||
- puts("");
|
||||
+ puts("ERR message=\"ABORT match\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
|
||||
@@ -750,7 +749,7 @@
|
||||
logit(log_file, "DEBUG HIT Cache found, trust cache enabled, skipping...\n");
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"cache hit found\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -762,7 +761,7 @@
|
||||
logit(log_file, "ERROR No content length from url %s\n", in_buff.url);
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"no content length from URL\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -775,7 +774,7 @@
|
||||
logit(log_file, "DEBUG No antivir check (Content length is upper than maxsize): %'.2f > %'.2f\n", usize, maxsize);
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"content length is upper than maxsize\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -787,7 +786,7 @@
|
||||
in_buff.url);
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"no content type from URL\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -799,7 +798,7 @@
|
||||
logit(log_file, "DEBUG No antivir check (ABORTCONTENT match) for content-type: %s\n", content_type);
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"ABORTCONTENT match\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -814,7 +813,7 @@
|
||||
if ((sockd = dconnect ()) < 0)
|
||||
{
|
||||
logit(log_file, "ERROR Can't connect to Clamd daemon, fallback to Squid.\n");
|
||||
- puts("");
|
||||
+ puts("BH message=\"cannot connect clamd daemon\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -824,7 +823,7 @@
|
||||
if (write (sockd, "zINSTREAM", 10) <= 0)
|
||||
{
|
||||
logit(log_file, "ERROR Can't write to Clamd socket.\n");
|
||||
- puts("");
|
||||
+ puts("BH message=\"cannot write to clamd socket\"");
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
@@ -844,7 +843,7 @@
|
||||
close (sockd);
|
||||
if (debug > 1)
|
||||
logit(log_file, "DEBUG Connection to clamd closed.\n");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"connection to clamd closed\"");
|
||||
fflush(stdout);
|
||||
if (statit == 1)
|
||||
timeit(g_start, "Total");
|
||||
@@ -892,8 +891,7 @@
|
||||
logit(log_file, "Squid Cache purged of url %s.\n", in_buff.url);
|
||||
}
|
||||
}
|
||||
- fprintf (stdout, "%s %s %s %s\n", urlredir,
|
||||
- in_buff.src_address, in_buff.ident, in_buff.method);
|
||||
+ fprintf (stdout, "OK rewrite-url=\"%s\"\n", urlredir);
|
||||
fflush(stdout);
|
||||
xfree(urlredir);
|
||||
if (debug != 0)
|
||||
@@ -911,7 +909,7 @@
|
||||
if (virusfound == 0) {
|
||||
if (debug != 0)
|
||||
logit(log_file, "DEBUG No virus detected.\n");
|
||||
- puts("");
|
||||
+ puts("ERR message=\"no virus detected\"");
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user