automatic update by autodist [release 6.11-1mamba;Sun Mar 23 2014]
This commit is contained in:
parent
b3585bd301
commit
eb9aa48c31
@ -1,2 +1,4 @@
|
||||
# squidclamav
|
||||
|
||||
SquidClamAv is a dedicated ClamAV antivirus redirector for Squid. It can run antivirus checks based on filename regex, content-type regex, and more. It is easy to install and works even with heavy Squid access.
|
||||
|
||||
|
23
squidclamav-6.10-config.patch
Normal file
23
squidclamav-6.10-config.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff -Nru squidclamav-6.10.orig/etc/squidclamav.conf squidclamav-6.10/etc/squidclamav.conf
|
||||
--- squidclamav-6.10.orig/etc/squidclamav.conf 2012-10-27 17:35:50.000000000 +0200
|
||||
+++ squidclamav-6.10/etc/squidclamav.conf 2013-03-27 19:49:41.902943626 +0100
|
||||
@@ -14,16 +14,16 @@
|
||||
maxsize 5000000
|
||||
|
||||
# When a virus is found then redirect the user to this URL
|
||||
-redirect http://proxy.domain.dom/cgi-bin/clwarn.cgi
|
||||
+redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi
|
||||
|
||||
# Path to the squiGuard binary if you want URL filtering, note that you'd better
|
||||
# use the squid configuration directive 'url_rewrite_program' instead.
|
||||
-#squidguard /usr/local/squidGuard/bin/squidGuard
|
||||
+#squidguard /usr/bin/squidGuard
|
||||
|
||||
# Path to the clamd socket, use clamd_local if you use Unix socket or if clamd
|
||||
# is listening on an Inet socket, comment clamd_local and set the clamd_ip and
|
||||
# clamd_port to the corresponding value.
|
||||
-clamd_local /var/run/clamav/clamd.ctl
|
||||
+clamd_local /var/run/clamav/clamd.socket
|
||||
#clamd_ip 192.168.1.5,127.0.0.1
|
||||
#clamd_port 3310
|
||||
|
52
squidclamav-6.2-cgi-it_IT.patch
Normal file
52
squidclamav-6.2-cgi-it_IT.patch
Normal file
@ -0,0 +1,52 @@
|
||||
diff -Nru squidclamav-6.2.orig//cgi-bin/clwarn.cgi.it_IT squidclamav-6.2/cgi-bin/clwarn.cgi.it_IT
|
||||
--- squidclamav-6.2.orig//cgi-bin/clwarn.cgi.it_IT 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ squidclamav-6.2/cgi-bin/clwarn.cgi.it_IT 2011-04-27 17:14:05.743456514 +0200
|
||||
@@ -0,0 +1,48 @@
|
||||
+#!/usr/bin/perl
|
||||
+use strict;
|
||||
+
|
||||
+use CGI;
|
||||
+
|
||||
+my $VERSION = '6.2';
|
||||
+my $TITLE_VIRUS = "SquidClamAv $VERSION : Virus rilevato";
|
||||
+
|
||||
+my $cgi = new CGI;
|
||||
+
|
||||
+my $url = $cgi->param('url') || '';
|
||||
+my $virus = $cgi->param('virus') || '';
|
||||
+my $source = $cgi->param('source') || '';
|
||||
+$source =~ s/\/-//;
|
||||
+my $user = $cgi->param('user') || '';
|
||||
+
|
||||
+
|
||||
+# Remove clamd infos
|
||||
+$virus =~ s/stream: //;
|
||||
+$virus =~ s/ FOUND//;
|
||||
+
|
||||
+
|
||||
+print $cgi->header();
|
||||
+
|
||||
+print $cgi->start_html(-title => $TITLE_VIRUS);
|
||||
+print qq{
|
||||
+<h2 style="color: #FF0000">$TITLE_VIRUS</h2>
|
||||
+<hr>
|
||||
+<p>
|
||||
+};
|
||||
+print qq{
|
||||
+L\'indirizzo URL richiesto $url <br>
|
||||
+contiene il virus : $virus
|
||||
+};
|
||||
+
|
||||
+print qq{
|
||||
+<p>
|
||||
+Il file non può essere scaricato.
|
||||
+<p>
|
||||
+Origine: $source / $user
|
||||
+<p>
|
||||
+<hr>
|
||||
+Powered by <a href="http://squidclamav.darold.net/">SquidClamAv $VERSION</a>.
|
||||
+};
|
||||
+
|
||||
+print $cgi->end_html();
|
||||
+
|
||||
+exit 0;
|
114
squidclamav.spec
Normal file
114
squidclamav.spec
Normal file
@ -0,0 +1,114 @@
|
||||
Name: squidclamav
|
||||
Version: 6.11
|
||||
Release: 1mamba
|
||||
Summary: A dedicated ClamAV antivirus redirector for Squid
|
||||
Group: Network/Security
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://sourceforge.net/projects/squidclamav/
|
||||
Source: http://downloads.sourceforge.net/project/squidclamav/squidclamav/%{version}/squidclamav-%{version}.tar.gz
|
||||
Patch0: %{name}-6.2-cgi-it_IT.patch
|
||||
Patch1: %{name}-6.10-config.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: c-icap-devel
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: perl-devel
|
||||
## AUTOBUILDREQ-END
|
||||
Requires(pre): squid
|
||||
Requires: clamd
|
||||
Requires: clamav
|
||||
Requires(pre): c-icap
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
SquidClamAv is a dedicated ClamAV antivirus redirector for Squid. It can run antivirus checks based on filename regex, content-type regex, and more. It is easy to install and works even with heavy Squid access.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--libexecdir=/var/www/cgi-bin/
|
||||
# --sysconfdir=%{_sysconfdir}/squid
|
||||
|
||||
%make
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
%makeinstall
|
||||
|
||||
rm -f %{buildroot}%{_datadir}/squidclamav/README
|
||||
|
||||
%post
|
||||
if [ $1 -ge 1 ]; then
|
||||
# new install or upgrade
|
||||
[ "`grep 1344/squidclamav %{_sysconfdir}/squid/squid.conf`" ] || {
|
||||
cat >> %{_sysconfdir}/squid/squid.conf << _EOF
|
||||
icap_enable on
|
||||
icap_send_client_ip on
|
||||
icap_send_client_username on
|
||||
icap_client_username_encode off
|
||||
icap_client_username_header X-Authenticated-User
|
||||
icap_preview_enable on
|
||||
icap_preview_size 1024
|
||||
icap_service service_req reqmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
|
||||
adaptation_access service_req allow all
|
||||
icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
|
||||
adaptation_access service_resp allow all
|
||||
_EOF
|
||||
service squid reload
|
||||
}
|
||||
|
||||
[ "`grep squidclamav.so %{_sysconfdir}/c-icap.conf`" ] || {
|
||||
cat >> %{_sysconfdir}/c-icap.conf << _EOF
|
||||
Service squidclamav squidclamav.so
|
||||
_EOF
|
||||
service c-icap reload
|
||||
}
|
||||
fi
|
||||
:
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%config(noreplace) %{_sysconfdir}/squidclamav.conf
|
||||
%{_sysconfdir}/squidclamav.conf.default
|
||||
%{_libdir}/c_icap/squidclamav.la
|
||||
%{_libdir}/c_icap/squidclamav.so
|
||||
%{_datadir}/c_icap/templates/squidclamav/en/MALWARE_FOUND
|
||||
%attr(0755,root,root) /var/www/cgi-bin/squidclamav/clwarn.cgi*
|
||||
%{_mandir}/man1/squidclamav.1*
|
||||
%doc AUTHORS COPYING ChangeLog README
|
||||
|
||||
%changelog
|
||||
* Sun Mar 23 2014 Automatic Build System <autodist@mambasoft.it> 6.11-1mamba
|
||||
- automatic update by autodist
|
||||
|
||||
* Thu Mar 28 2013 Automatic Build System <autodist@mambasoft.it> 6.10-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Mon Jul 25 2011 Automatic Build System <autodist@mambasoft.it> 6.3-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Thu Apr 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-5mamba
|
||||
- fixed user of cgi files
|
||||
|
||||
* Thu Apr 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-4mamba
|
||||
- fixed italian cgi typo and permissions
|
||||
|
||||
* Wed Apr 27 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-3mamba
|
||||
- added italian language cgi
|
||||
- install cgi in default server directory
|
||||
- fix default configuration for cgi and squidGuard paths
|
||||
|
||||
* Wed Apr 27 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-2mamba
|
||||
- added post script configuration for squid and c-icap
|
||||
|
||||
* Wed Apr 13 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-1mamba
|
||||
- package created by autospec
|
Loading…
Reference in New Issue
Block a user