X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=clamav-pld_config.patch;h=922396aea72868d9ec3ea6ce730018b748911ec6;hb=02c8fe2bdb0ba455371a177791b6b1b238a60356;hp=e902464d7adc398343a651303169e96738fc9eef;hpb=e41d1146a6336680791c4f79f94dd7ed546a83be;p=packages%2Fclamav.git diff --git a/clamav-pld_config.patch b/clamav-pld_config.patch index e902464..922396a 100644 --- a/clamav-pld_config.patch +++ b/clamav-pld_config.patch @@ -1,87 +1,182 @@ -diff -urN clamav-0.65.orig/etc/clamav.conf clamav-0.65/etc/clamav.conf ---- clamav-0.65.orig/etc/clamav.conf Mon Dec 1 14:59:35 2003 -+++ clamav-0.65/etc/clamav.conf Mon Dec 1 14:57:07 2003 -@@ -5,12 +5,12 @@ - +diff -ur clamav-0.97.1/etc//clamav-milter.conf.sample clamav-0.97.1.new/etc//clamav-milter.conf.sample +--- clamav-0.97.1/etc//clamav-milter.conf.sample 2011-01-10 18:48:28.000000000 +0100 ++++ clamav-0.97.1.new/etc//clamav-milter.conf.sample 2011-07-14 18:24:02.801795736 +0200 +@@ -3,7 +3,7 @@ + ## # Comment or remove the line below. -Example -+# Example ++#Example + + + ## +@@ -17,12 +17,12 @@ + # inet6:port@[hostname|ip-address] - to specify an ipv6 socket + # + # Default: no default +-#MilterSocket /tmp/clamav-milter.socket ++MilterSocket /var/lib/clamav/clamav-milter.socket + #MilterSocket inet:7357 + + # Define the group ownership for the (unix) milter socket. + # Default: disabled (the primary group of the user running clamd) +-#MilterSocketGroup virusgroup ++#MilterSocketGroup clamav + + # Sets the permissions on the (unix) milter socket to the specified mode. + # Default: disabled (obey umask) +@@ -64,7 +64,7 @@ + # daemon (main thread). + # + # Default: disabled +-#PidFile /var/run/clamav-milter.pid ++PidFile /var/run/clamav/clamav-milter.pid + + # Optional path to the global temporary directory. + # Default: system specific (usually /tmp or /var/tmp). +@@ -90,7 +90,7 @@ + # with the same socket: clamd servers will be selected in a round-robin fashion. + # + # Default: no default +-#ClamdSocket tcp:scanner.mydomain:7357 ++ClamdSocket unix:/var/lib/clamav/clamd.socket + + + ## +@@ -238,13 +238,13 @@ + # Use system logger (can work together with LogFile). + # + # Default: no +-#LogSyslog yes ++LogSyslog yes + + # Specify the type of syslog messages - please refer to 'man syslog' + # for facility names. + # + # Default: LOG_LOCAL6 +-#LogFacility LOG_MAIL ++LogFacility LOG_MAIL + + # Enable verbose logging. + # +diff -ur clamav-0.97.1/etc//clamd.conf.sample clamav-0.97.1.new/etc//clamd.conf.sample +--- clamav-0.97.1/etc//clamd.conf.sample 2011-05-13 13:25:31.000000000 +0200 ++++ clamav-0.97.1.new/etc//clamd.conf.sample 2011-07-14 18:19:05.824861957 +0200 +@@ -5,13 +5,13 @@ + + + # Comment or remove the line below. +-Example ++#Example # Uncomment this option to enable logging. - # LogFile must be writable for the user running the daemon. - # Full path is required. + # LogFile must be writable for the user running daemon. + # A full path is required. + # Default: disabled -#LogFile /tmp/clamd.log +#LogFile /var/log/clamd.log # By default the log file is locked for writing - the lock protects against # running clamd multiple times (if want to run another clamd, please -@@ -30,19 +30,20 @@ - #LogTime +@@ -40,12 +40,12 @@ # Use system logger (can work together with LogFile). --#LogSyslog -+LogSyslog + # Default: no +-#LogSyslog yes ++LogSyslog yes - # Enable verbose logging. --#LogVerbose -+# LogVerbose + # Specify the type of syslog messages - please refer to 'man syslog' + # for facility names. + # Default: LOG_LOCAL6 +-#LogFacility LOG_MAIL ++LogFacility LOG_MAIL - # This option allows you to save the process identifier of the listening + # Enable verbose logging. + # Default: no +@@ -58,7 +58,7 @@ + # This option allows you to save a process identifier of the listening # daemon (main thread). + # Default: disabled -#PidFile /var/run/clamd.pid -+# We use dir becouse covering clamd.pid file couse default rights are sane. -+PidFile /var/run/clamav/clamd.pid - - # Path to a directory containing .db files. - # Default is the hardcoded directory (mostly /usr/local/share/clamav, - # it depends on installation options). --#DataDirectory /var/lib/clamav -+DataDirectory /var/lib/clamav - - # The daemon works in local or network mode. Currently the local mode is - # recommended for security reasons. -@@ -50,10 +51,12 @@ - # Path to the local socket. The daemon doesn't change the mode of the - # created file (portability reasons). You may want to create it in a directory - # which is only accessible for a user running daemon. --LocalSocket /tmp/clamd -+# LocalSocket /var/run/clamav/clamd.socket -+ ++PidFile /var/run/clamav/clamd.pid + + # Optional path to the global temporary directory. + # Default: system specific (usually /tmp or /var/tmp). +@@ -77,11 +77,11 @@ + + # Path to a local socket file the daemon will listen on. + # Default: disabled (must be specified by a user) +-#LocalSocket /tmp/clamd.socket +LocalSocket /var/lib/clamav/clamd.socket - # Remove stale socket after unclean shutdown. --#FixStaleSocket -+FixStaleSocket + # Sets the group ownership on the unix socket. + # Default: disabled (the primary group of the user running clamd) +-#LocalSocketGroup virusgroup ++#LocalSocketGroup clamav - # TCP port address. - #TCPSocket 3310 -@@ -111,11 +114,11 @@ + # Sets the permissions on the unix socket to the specified mode. + # Default: disabled (socket is world accessible) +@@ -204,7 +204,7 @@ LocalSocket /var/lib/clamav/clamd.socket - # Run as selected user (clamd must be started by root). - # By default it doesn't drop privileges. + # Run as another user (clamd must be started by root for this option to work) + # Default: don't drop privileges -#User clamav +User clamav - # Initialize the supplementary group access (for all groups in /etc/group - # user is added in. clamd must be started by root). --#AllowSupplementaryGroups -+AllowSupplementaryGroups - - # Don't fork into background. Useful in debugging. - #Foreground -@@ -128,13 +131,12 @@ + # Stop daemon when libclamav reports out of memory condition. + #ExitOnOOM yes +diff -ur clamav-0.97.1/etc//freshclam.conf.sample clamav-0.97.1.new/etc//freshclam.conf.sample +--- clamav-0.97.1/etc//freshclam.conf.sample 2011-01-10 18:48:28.000000000 +0100 ++++ clamav-0.97.1.new/etc//freshclam.conf.sample 2011-07-14 18:14:32.705707450 +0200 +@@ -3,9 +3,14 @@ + ## Please read the freshclam.conf(5) manual before editing this file. ## - # Uncomment this option if you are planning to scan mail files. --#ScanMail -+ScanMail - - ## - ## Archive support - ## - -- - # Comment this line to disable scanning of the archives. - ScanArchive ++## PLD NOTE: Note that freshclam is called periodically via cron ++## Check /etc/sysconfig/clamd for details ++## Seems better to run task once per period than keep daemon running ++## only for that. ++## But if you have arguments please tell us. + # Comment or remove the line below. +-Example ++#Example + + # Path to the database directory. + # WARNING: It must match clamd.conf's directive! +@@ -30,7 +35,7 @@ + + # Use system logger (can work together with UpdateLogFile). + # Default: no +-#LogSyslog yes ++LogSyslog yes + + # Specify the type of syslog messages - please refer to 'man syslog' + # for facility names. +@@ -48,7 +53,7 @@ + # By default when started freshclam drops privileges and switches to the + # "clamav" user. This directive allows you to change the database owner. + # Default: clamav (may depend on installation options) +-#DatabaseOwner clamav ++DatabaseOwner clamav + + # Initialize supplementary group access (freshclam must be started by root). + # Default: no +@@ -96,7 +101,7 @@ + + # Number of database checks per day. + # Default: 12 (every two hours) +-#Checks 24 ++Checks 2 + + # Proxy settings + # Default: disabled +@@ -118,7 +123,7 @@ + + # Send the RELOAD command to clamd. + # Default: no +-#NotifyClamd /path/to/clamd.conf ++#NotifyClamd /etc/clamd.conf + + # Run command after successful database update. + # Default: disabled