Re: [Clamav-users] Multilog patch / daemontools

2004-10-04 Thread Arthur Kerpician
[EMAIL PROTECTED] wrote:
Hi all,
I was using clamav-0.75.1 with daemontools and a stderr-patch 
(developed for 0.70 but working on 0.75.1) to catch all the 
output to multilog. I recently upgraded to clamav-0.80rc3 and 
I found that when starting the clamd service 2 instances of 
clamd are running and the log shows me that daemontools tried 
to start clamd every second. When clamdctl stop only 1 of 
these instances are killed and clamd continues to run until 
killall clamd.
   

You do not need to apply the patch.  More below
 

This is my clamdctl start section:
[code]
#!/bin/sh
PATH=/opt/clamav/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH
case "$1" in
 start)
   echo "Starting clamd"
   if svok /service/clamd ; then
 svc -u /service/clamd
   else
 echo clamd supervise not running
   fi
   if [ -d /var/lock/subsys ]; then
 touch /var/lock/subsys/clamd
   fi
   ;;
[/code]
This is my supervise/run script:
[code]
#!/bin/sh
exec 2>&1
exec /usr/local/bin/setuidgid root /usr/local/bin/softlimit 
-a 4000 /opt/clamav/sbin/clamd -c 
/opt/clamav/etc/clamd.conf [/code]

   

Take out the "/usr/local/bin/setuidgid root"  portion.  You don't need it.
 

And finally, this is clamd.conf:
[code]
LogFile stderr
LogSyslog
LogFacility LOG_MAIL
LocalSocket /tmp/clamd
FixStaleSocket
MaxThreads 20
User qscand
ScanOLE2
ScanMail
ScanHTML
ScanArchive
ScanRAR
[/code]
   

Change
LogFile stderr
to
LogFile /dev/stdout
As well, you should have this turned on:
Foreground
 

Try the above suggestions and see if it works for you.
 

It works without the patch, i can log to stdout. Still, clamd is started 
twice giving me an error about the unix socket (/tmp/clamd) being used 
by another proccess. I took out the setuidgid and have the same 
behaviour. Again, when giving clamdctl start, 2 proccess are started and 
if i stop the service (clamdctl stop) one remains active and works ok, 
but it's not supervised. I can't see what is the cause for starting 2 
instances of clamd
If i try to start clamd as qscand (/usr/local/bin/setuidgid qscand) i 
get "ERROR: Can't open /dev/stdout in append mode"
___
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


Re: [Clamav-users] Multilog patch / daemontools

2004-10-03 Thread Daniel Alberto CaƱas

On Oct 3, 2004, at 5:22 PM, <[EMAIL PROTECTED]> wrote:

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Arthur Kerpician
Sent: Sunday, October 03, 2004 1:26 PM
To: [EMAIL PROTECTED]
Subject: [Clamav-users] Multilog patch / daemontools
Hi all,
I was using clamav-0.75.1 with daemontools and a stderr-patch
(developed for 0.70 but working on 0.75.1) to catch all the
output to multilog. I recently upgraded to clamav-0.80rc3 and
I found that when starting the clamd service 2 instances of
clamd are running and the log shows me that daemontools tried
to start clamd every second. When clamdctl stop only 1 of
these instances are killed and clamd continues to run until
killall clamd.
You do not need to apply the patch.  More below

This is my clamdctl start section:
[code]
#!/bin/sh
PATH=/opt/clamav/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH
case "$1" in
  start)
echo "Starting clamd"
if svok /service/clamd ; then
  svc -u /service/clamd
else
  echo clamd supervise not running
fi
if [ -d /var/lock/subsys ]; then
  touch /var/lock/subsys/clamd
fi
;;
[/code]
This is my supervise/run script:
[code]
#!/bin/sh
exec 2>&1
exec /usr/local/bin/setuidgid root /usr/local/bin/softlimit
-a 4000 /opt/clamav/sbin/clamd -c
/opt/clamav/etc/clamd.conf [/code]
Take out the "/usr/local/bin/setuidgid root"  portion.  You don't need 
it.


And finally, this is clamd.conf:
[code]
LogFile stderr
LogSyslog
LogFacility LOG_MAIL
LocalSocket /tmp/clamd
FixStaleSocket
MaxThreads 20
User qscand
ScanOLE2
ScanMail
ScanHTML
ScanArchive
ScanRAR
[/code]
Change
LogFile stderr
to
LogFile /dev/stdout
As well, you should have this turned on:
Foreground

Clamdscan is called from qmail-scanner.
1. Anyone aware of a new patch for outputing to stderr?
2. What am i doing wrong since i cannot start only 1 instance
of clamd and daemontools tries to fire-up every second a new
proccess although clamav is already up?
Try the above suggestions and see if it works for you.
Thanks,
Arthur
___
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
I just upgraded live from .75 to .8rc3, to catch the jpg exploits, and 
I applied the patch and had no problems.
Before applying the patch I tried /dev/stdout and /dev/sterr in the 
LogFile directive but I had problems, can;t open file in append mode...
I applied the patch and everything worked fine
I thought the new version might alow logging to stdout or stderr, but 
it didn't work for me.

BTW, I am running RH7.3.


___
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
___
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users


RE: [Clamav-users] Multilog patch / daemontools

2004-10-03 Thread webmaster
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Arthur Kerpician
> Sent: Sunday, October 03, 2004 1:26 PM
> To: [EMAIL PROTECTED]
> Subject: [Clamav-users] Multilog patch / daemontools
> 
> Hi all,
> I was using clamav-0.75.1 with daemontools and a stderr-patch 
> (developed for 0.70 but working on 0.75.1) to catch all the 
> output to multilog. I recently upgraded to clamav-0.80rc3 and 
> I found that when starting the clamd service 2 instances of 
> clamd are running and the log shows me that daemontools tried 
> to start clamd every second. When clamdctl stop only 1 of 
> these instances are killed and clamd continues to run until 
> killall clamd.

You do not need to apply the patch.  More below


> This is my clamdctl start section:
> [code]
> #!/bin/sh
> PATH=/opt/clamav/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
> export PATH
> 
> case "$1" in
>   start)
> echo "Starting clamd"
> if svok /service/clamd ; then
>   svc -u /service/clamd
> else
>   echo clamd supervise not running
> fi
> if [ -d /var/lock/subsys ]; then
>   touch /var/lock/subsys/clamd
> fi
> ;;
> [/code]
> 
> This is my supervise/run script:
> [code]
> #!/bin/sh
> exec 2>&1
> exec /usr/local/bin/setuidgid root /usr/local/bin/softlimit 
> -a 4000 /opt/clamav/sbin/clamd -c 
> /opt/clamav/etc/clamd.conf [/code]
> 

Take out the "/usr/local/bin/setuidgid root"  portion.  You don't need it.


> And finally, this is clamd.conf:
> [code]
> LogFile stderr
> LogSyslog
> LogFacility LOG_MAIL
> LocalSocket /tmp/clamd
> FixStaleSocket
> MaxThreads 20
> User qscand
> ScanOLE2
> ScanMail
> ScanHTML
> ScanArchive
> ScanRAR
> [/code]

Change
LogFile stderr
to
LogFile /dev/stdout

As well, you should have this turned on:
Foreground



> 
> Clamdscan is called from qmail-scanner.
> 1. Anyone aware of a new patch for outputing to stderr?
> 2. What am i doing wrong since i cannot start only 1 instance 
> of clamd and daemontools tries to fire-up every second a new 
> proccess although clamav is already up?

Try the above suggestions and see if it works for you.

> 
> Thanks,
> Arthur
> ___
> http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
> 

___
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users