diff --git a/clamav.spec b/clamav.spec index 01a2d44..2001bfc 100644 --- a/clamav.spec +++ b/clamav.spec @@ -41,7 +41,7 @@ Summary: End-user tools for the Clam Antivirus scanner Name: clamav Version: 0.102.3 -Release: 1%{?dist} +Release: 2%{?dist} License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2} URL: https://www.clamav.net/ %if %{with unrar} @@ -322,6 +322,8 @@ install -D -m 0644 -p %SOURCE12 $RPM_BUILD_ROOT%homedir/bytecode.cvd ## prepare the clamd-files install -D -m 0644 -p %SOURCE3 _doc_server/clamd.logrotate install -D -m 0644 -p %SOURCE5 _doc_server/README +## Fixup URL for EPEL +%{?epel:sed -i -e s/product=Fedora/product=Fedora%20EPEL/ _doc_server/README} install -D -p -m 0644 %SOURCE100 $RPM_BUILD_ROOT%_unitdir/clamonacc.service @@ -615,6 +617,9 @@ fi %changelog +* Thu May 28 2020 Orion Poplawski - 0.102.3-2 +- Update clamd README file (bz#1798369) + * Thu May 14 2020 Orion Poplawski - 0.102.3-1 - Update to 0.102.3 (bz#1834910) - Security fixes CVE-2020-3327 CVE-2020-3341 diff --git a/clamd-README b/clamd-README index 1399542..1eb00ef 100644 --- a/clamd-README +++ b/clamd-README @@ -1,18 +1,16 @@ -To create individual clamd-instance take the following files and -modify/copy them in the suggested way: + By default, clamd provides a general "scan" service that requires minimal +configuration. To configure, edit /etc/clamd/scan.conf and: -/etc/clamd/scan.conf: - * set LocalSocket for localhost access or TCPSocket for network access - and User to suitable values. Logging through syslog is usually better than an individual - Logfile. - * place this file into /etc/clamd.d with an unique service-name; - e.g. as /etc/clamd.d/.conf + * set LocalSocket for localhost access or TCPSocket for network access. - When using TCPSocket, create iptables rules which are limiting the - access by source and/or by using '-m owner'. + Default configuration will: + + * Log to syslog + * Run as the user "clamscan" When LogFile feature is wanted, it must be writable for the assigned - User. Recommended way to reach this, is to: +User. The recommended way is to: + * make it owned by the User's *group* * assign at least 0620 (u+rw,g+w) permissions @@ -22,34 +20,41 @@ modify/copy them in the suggested way: | # chmod 0620 | # restorecon - NEVER use 'clamav' as the user since he can modify the database. - This is the user who is running the application; e.g. for mimedefang - (http://www.roaringpenguin.com/mimedefang), the user might be - 'defang'.Theoretically, distinct users could be used, but it must be - made sure that the application-user can write into the socket-file, - and that the clamd-user can access the files asked by the - application to be checked. + NEVER use 'clamav' as the user since it can modify the database. This is +the user who is running the application; e.g. for mimedefang +(http://www.roaringpenguin.com/mimedefang), the user might be 'defang'. +Theoretically, distinct users could be used, but it must be made sure that +the application-user can write into the socket-file, and that the clamd-user +can access the files asked by the application to be checked. + + The default service can be enabled and started with: + + systemctl enable clamd@scan.service + systemctl start clamd@scan.service + + To create other individual clamd-instances take the following files in +/usr/share/doc/clamd/ and modify/copy them in the suggested way: + +clamd.conf, copy to /etc/clamd.d/.conf + * Change as to match name of config file + * Any other changes as noted above clamd.logrotate: (only when LogFile feature is used) * set the correct value for the logfile * place it into /etc/logrotate.d -clamd@.service: (systemd instance) - * instance of clamd@.service - -Additionally, when using LocalSocket instead of TCPSocket, the directory -for the socket file must be created. For tmpfiles based systems, you -might want to create a file /etc/tmpfiles.d/clamd..conf -with a content of + Additionally, when using LocalSocket instead of TCPSocket, the directory +for the socket file must be created. For tmpfiles based systems, you might +want to create a file /etc/tmpfiles.d/clamd..conf with a content of | d /run/clamd. -Adjust (0710 should suffice for most cases) and + -so that the socket can be accessed by clamd and by the applications -using clamd. Make sure that the socket is not world accessible; else, -DOS attacks or worse are trivial. + Adjust (0710 should suffice for most cases) and + +so that the socket can be accessed by clamd and by the applications using +clamd. Make sure that the socket is not world accessible; else, DOS attacks +or worse are trivial. -After emulating these steps by hand (or else rebooting), you still need set + After emulating these steps by hand (or else rebooting), you still need set SELinux: chcon -t clamd_var_run_t /run/clamd. @@ -65,9 +70,15 @@ and also maybe this one (I need to confirm that is obsolete) setsebool -P antivirus_use_jit 1 + The new service can be enabled and started with: + + systemctl enable clamd@.service + systemctl start clamd@.service + + [Disclaimer: this file and the script/configfiles are not part of the official clamav package. Please send complaints and comments to - https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20EPEL&component=clamav] + https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=clamav]