rpms/clamav/devel clamav-0.95rc1-umask.patch, NONE, 1.1 README.fedora, 1.1, 1.2 clamav-milter.sysv, 1.1, 1.2 clamav-milter.upstart, 1.1, 1.2 clamav.spec, 1.81, 1.82 clamd-wrapper, 1.4, 1.5 clamd.scan.upstart, 1.1, 1.2
Enrico Scholz
ensc at fedoraproject.org
Sun Mar 8 12:47:51 UTC 2009
Author: ensc
Update of /cvs/extras/rpms/clamav/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2018
Modified Files:
README.fedora clamav-milter.sysv clamav-milter.upstart
clamav.spec clamd-wrapper clamd.scan.upstart
Added Files:
clamav-0.95rc1-umask.patch
Log Message:
updated
clamav-0.95rc1-umask.patch:
--- NEW FILE clamav-0.95rc1-umask.patch ---
Index: clamav-0.95rc1/clamav-milter/clamav-milter.c
===================================================================
--- clamav-0.95rc1.orig/clamav-milter/clamav-milter.c
+++ clamav-0.95rc1/clamav-milter/clamav-milter.c
@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
if((opt = optget(opts, "PidFile"))->enabled) {
FILE *fd;
- mode_t old_umask = umask(0006);
+ mode_t old_umask = umask(0022);
if((fd = fopen(opt->strarg, "w")) == NULL) {
logg("!Can't save PID in file %s\n", opt->strarg);
Index: clamav-0.95rc1/shared/output.c
===================================================================
--- clamav-0.95rc1.orig/shared/output.c
+++ clamav-0.95rc1/shared/output.c
@@ -250,7 +250,7 @@ int logg(const char *str, ...)
#endif
if(logg_file) {
if(!logg_fp) {
- old_umask = umask(0037);
+ old_umask = umask(0077);
if((logg_fp = fopen(logg_file, "at")) == NULL) {
umask(old_umask);
#ifdef CL_THREAD_SAFE
Index: clamav-0.95rc1/freshclam/freshclam.c
===================================================================
--- clamav-0.95rc1.orig/freshclam/freshclam.c
+++ clamav-0.95rc1/freshclam/freshclam.c
@@ -102,7 +102,7 @@ static void writepid(const char *pidfile
{
FILE *fd;
int old_umask;
- old_umask = umask(0006);
+ old_umask = umask(0022);
if((fd = fopen(pidfile, "w")) == NULL) {
logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno));
} else {
Index: README.fedora
===================================================================
RCS file: /cvs/extras/rpms/clamav/devel/README.fedora,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.fedora 1 Jan 2008 13:19:16 -0000 1.1
+++ README.fedora 8 Mar 2009 12:47:20 -0000 1.2
@@ -1,5 +1,42 @@
-Add
+A clamav-milter setup consists of the following three components:
- INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl
+* the clamav-milter itself
-to your sendmail.mc.
+ --> this is provided by the 'clamav-milter' package plus (alternatively)
+ 'clamav-milter-upstart' or 'clamav-milter-sysvinit'
+
+ The main configuration is in /etc/mail/clamav-milter.conf and MUST
+ be changed before first use.
+
+ The -sysvinit package is managed by the traditional tools, but
+ -upstart requires modification of /etc/event.d/clamav-milter to
+ enable automatic startup. See comments there for more details.
+
+* a clamav scanner daemon
+
+ --> this package is called 'clamav-scanner' plus (alternatively)
+ 'clamav-scanner-upstart' or 'clamav-scanner-sysvinit'
+
+ The daemon is configured by /etc/clamd.d/scan.conf (which MUST be
+ edited before first use).
+
+ The -sysvinit package is managed by the traditional tools, but
+ -upstart requires modification of /etc/event.d/clamd.scan to enable
+ automatic startup. See comments there for more details.
+
+* the MDA (sendmail/postfix)
+
+ --> you should know how to install this...
+
+ When communicating across unix sockets with the clamav-milter, it is
+ suggested to use the /var/run/clamav-milter/clamav.sock path. You
+ have to add something like
+
+ INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl
+
+ to your sendmail.mc.
+
+
+
+It is suggested that components communicate through TCP sockets as
+this eases setup. Please add corresponding packet filter rules!
Index: clamav-milter.sysv
===================================================================
RCS file: /cvs/extras/rpms/clamav/devel/clamav-milter.sysv,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- clamav-milter.sysv 8 Mar 2009 11:38:35 -0000 1.1
+++ clamav-milter.sysv 8 Mar 2009 12:47:20 -0000 1.2
@@ -11,7 +11,7 @@
exec=/usr/sbin/clamav-milter
prog="clamav-milter"
-OPTS=
+OPTS='-c /etc/mail/clamav-milter.conf'
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
pidfile=/var/run/clamav-milter/milter.pid
@@ -21,8 +21,7 @@
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
- daemon --pidfile=${pidfile} \
- $exec $OPTS --nofork=no --pid=${pidfile} && success || failure
+ daemon --pidfile=${pidfile} $exec $OPTS --nofork=no --pid=${pidfile}
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
@@ -31,7 +30,7 @@
stop() {
echo -n $"Stopping $prog: "
- killproc -o "${pidfile} $exec && success || failure
+ killproc -p "${pidfile}" $exec
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
@@ -53,7 +52,7 @@
rh_status() {
# run checks to determine if the service is running or use generic status
- status $prog
+ status -p "${pidfile}" $prog
}
rh_status_q() {
Index: clamav-milter.upstart
===================================================================
RCS file: /cvs/extras/rpms/clamav/devel/clamav-milter.upstart,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- clamav-milter.upstart 8 Mar 2009 11:38:36 -0000 1.1
+++ clamav-milter.upstart 8 Mar 2009 12:47:20 -0000 1.2
@@ -16,4 +16,4 @@
stop on runlevel 6
respawn
-exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter --nofork=yes
+exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --nofork=yes
Index: clamav.spec
===================================================================
RCS file: /cvs/extras/rpms/clamav/devel/clamav.spec,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- clamav.spec 8 Mar 2009 11:38:36 -0000 1.81
+++ clamav.spec 8 Mar 2009 12:47:20 -0000 1.82
@@ -21,7 +21,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.95
-Release: %release_func 0.0.1%{?snapshot:.%snapshot}
+Release: %release_func 0.0.3%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -46,6 +46,7 @@
Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
Patch26: clamav-0.95-cliopts.patch
+Patch27: clamav-0.95rc1-umask.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@@ -310,6 +311,7 @@
%patch24 -p1 -b .private
%patch25 -p1 -b .open
%patch26 -p1 -b .cliopts
+%patch27 -p1 -b .umask
install -p -m0644 %SOURCE300 clamav-milter/
@@ -422,7 +424,7 @@
### The scanner stuff
sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
- etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/clamd.scan
+ etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/scan.conf
sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
> $RPM_BUILD_ROOT%_initrddir/clamd.scan
@@ -629,7 +631,7 @@
%files scanner
%defattr(-,root,root,-)
%dir %attr(0710,%scanuser,%scanuser) %scanstatedir
-%config(noreplace) %_sysconfdir/clamd.d/clamd.scan
+%config(noreplace) %_sysconfdir/clamd.d/scan.conf
%ghost %scanstatedir/clamd.sock
%files scanner-sysvinit
Index: clamd-wrapper
===================================================================
RCS file: /cvs/extras/rpms/clamav/devel/clamd-wrapper,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- clamd-wrapper 8 Mar 2009 11:38:36 -0000 1.4
+++ clamd-wrapper 8 Mar 2009 12:47:21 -0000 1.5
@@ -51,7 +51,7 @@
stop () {
echo -n $"Stopping $prog: "
- killproc $procname
+ killproc -p ${CLAMD_PIDFILE} $procname
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
@@ -79,7 +79,7 @@
start|stop|restart|reload)
$1 ;;
status)
- status $procname ;;
+ status -p ${CLAMD_PIDFILE} $procname ;;
condrestart)
test ! -f $lockfile || restart
;;
Index: clamd.scan.upstart
===================================================================
RCS file: /cvs/extras/rpms/clamav/devel/clamd.scan.upstart,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- clamd.scan.upstart 8 Mar 2009 11:38:36 -0000 1.1
+++ clamd.scan.upstart 8 Mar 2009 12:47:21 -0000 1.2
@@ -12,4 +12,4 @@
stop on runlevel 6
respawn
-exec /usr/sbin/clamd -c /etc/clamd.d/clamd.scan --nofork=yes
+exec /usr/sbin/clamd -c /etc/clamd.d/scan.conf --nofork=yes
More information about the fedora-extras-commits
mailing list