[amavisd-new] Move clamd socket to /var/run/clamd.amavisd/clamd.sock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 07c1a82b541e40cd02acd8f9e1872babc3c75548
Author: Juan Orti Alcaine <j.orti.alcaine@xxxxxxxxx>
Date:   Mon Feb 17 09:21:16 2014 +0100

    Move clamd socket to /var/run/clamd.amavisd/clamd.sock
    
    Move clamd socket and allow freshclam to notify the running daemon

 amavis-clamd.conf         |    4 ++--
 amavisd-conf.patch        |    2 +-
 amavisd-new-tmpfiles.conf |    2 +-
 amavisd-new.spec          |   11 +++++++----
 4 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/amavis-clamd.conf b/amavis-clamd.conf
index 0449325..a84b8ef 100644
--- a/amavis-clamd.conf
+++ b/amavis-clamd.conf
@@ -7,7 +7,7 @@ LogFacility LOG_MAIL
 
 # This option allows you to save a process identifier of the listening
 # daemon (main thread).
-PidFile /var/run/amavisd/clamd.pid
+PidFile /var/run/clamd.amavisd/clamd.pid
 
 # Remove stale socket after unclean shutdown.
 # Default: disabled
@@ -17,4 +17,4 @@ FixStaleSocket yes
 User amavis
 
 # Path to a local socket file the daemon will listen on.
-LocalSocket /var/spool/amavisd/clamd.sock
+LocalSocket /var/run/clamd.amavisd/clamd.sock
diff --git a/amavisd-conf.patch b/amavisd-conf.patch
index ef1b7a1..5cb5e23 100644
--- a/amavisd-conf.patch
+++ b/amavisd-conf.patch
@@ -92,7 +92,7 @@
 -# #   this entry; when running chrooted one may prefer a socket under $MYHOME.
 +  ### http://www.clamav.net/
 +  ['ClamAV-clamd',
-+    \&ask_daemon, ["CONTSCAN {}\n", "/var/spool/amavisd/clamd.sock"],
++    \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamd.amavisd/clamd.sock"],
 +    qr/\bOK$/m, qr/\bFOUND$/m,
 +    qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
 +  # NOTE: run clamd under the same user as amavisd - or run it under its own
diff --git a/amavisd-new-tmpfiles.conf b/amavisd-new-tmpfiles.conf
index 082b271..fac3b2f 100644
--- a/amavisd-new-tmpfiles.conf
+++ b/amavisd-new-tmpfiles.conf
@@ -1,2 +1,2 @@
 d /var/run/amavisd 755 amavis amavis -
-d /var/run/clamd.amavisd 755 amavis amavis -
+d /var/run/clamd.amavisd 770 amavis clamupdate -
diff --git a/amavisd-new.spec b/amavisd-new.spec
index a9fb647..e56caf7 100644
--- a/amavisd-new.spec
+++ b/amavisd-new.spec
@@ -3,7 +3,7 @@
 Summary:        Email filter with virus scanner and spamassassin support
 Name:           amavisd-new
 Version:        2.8.1
-Release:        1%{?prerelease:.%{prerelease}}%{?dist}
+Release:        2%{?prerelease:.%{prerelease}}%{?dist}
 # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+
 License:        GPLv2+ and BSD and GFDL
 Group:          Applications/System
@@ -147,8 +147,7 @@ install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.co
 install -D -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/amavisd
 
 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/{tmp,db,quarantine}
-touch $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/clamd.sock
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/amavisd
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/{clamd.amavisd,amavisd}
 
 %if 0%{?fedora} > 17
 install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_tmpfilesdir}/amavisd-new.conf
@@ -197,11 +196,11 @@ exit 0
 %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp
 %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/db
 %dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine
-%ghost %{_localstatedir}/spool/amavisd/clamd.sock
 %if 0%{?fedora} > 17
 %attr(644,root,root) %{_tmpfilesdir}/amavisd-new.conf
 %endif
 %dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd
+%dir %attr(770,amavis,clamupdate) %{_localstatedir}/run/clamd.amavisd
 
 %files snmp
 %defattr(-,root,root,-)
@@ -210,6 +209,10 @@ exit 0
 %{_sbindir}/amavisd-snmp-subagent
 
 %changelog
+* Mon Feb 17 2014 Juan Orti Alcaine <jorti@xxxxxxxxxxxxxxxxx> 2.8.1-2
+- Move clamd socket to /var/run/clamd.amavisd
+- Add permissions to clamupdate to notify clamd
+
 * Wed Feb 12 2014 Juan Orti Alcaine <jorti@xxxxxxxxxxxxxxxxx> 2.8.1-1
 - Update to version 2.8.1
 - Add systemd service units
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux