Your message dated Tue, 10 May 2005 10:06:15 -0400
with message-id <[EMAIL PROTECTED]>
and subject line Bug#307719: clamav-daemon: Add support for stderr logging
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 4 May 2005 22:52:20 +0000
>From [EMAIL PROTECTED] Wed May 04 15:52:20 2005
Return-path: <[EMAIL PROTECTED]>
Received: from (apt.kaalh) [82.240.80.80]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1DTSj6-0008UX-00; Wed, 04 May 2005 15:52:20 -0700
Received: (qmail 15644 invoked by uid 1000); 4 May 2005 22:53:05 -0000
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: KaalH! <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: clamav-daemon: Add support for stderr logging
X-Mailer: reportbug 3.8
Date: Thu, 05 May 2005 00:53:05 +0200
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
Package: clamav-daemon
Version: 0.83-5
Severity: wishlist
please apply this patch to add stderr loggging. This is for multilog/svlogd.
It allows "LogFile stderr" configuration option
thanks
diff -ru clamav-0.84/clamd/clamd.c clamav-0.84-new/clamd/clamd.c
--- clamav-0.84/clamd/clamd.c 2005-04-20 01:33:13.000000000 +0200
+++ clamav-0.84-new/clamd/clamd.c 2005-05-04 22:52:13.000000000
+0200
@@ -137,8 +137,13 @@
if((cpt = cfgopt(copt, "LogFile"))) {
logg_file = cpt->strarg;
if(strlen(logg_file) < 2 || (logg_file[0] != '/' && logg_file[0] !=
'\\' && logg_file[1] != ':')) {
- fprintf(stderr, "ERROR: LogFile requires full path.\n");
- exit(1);
+ if (strcmp(logg_file,"stderr")!=0) {
+ fprintf(stderr, "ERROR: LogFile requires full path.\n");
+ exit(1);
+ }
+ else {
+ use_stderr=1;
+ }
}
time(&currtime);
if(logg("+++ Started at %s", ctime(&currtime))) {
diff -ru clamav-0.84/shared/output.c clamav-0.84-new/shared/output.c
--- clamav-0.84/shared/output.c 2005-04-20 01:33:15.000000000 +0200
+++ clamav-0.84-new/shared/output.c 2005-05-04 22:50:01.000000000
+0200
@@ -115,7 +115,9 @@
#ifdef CL_THREAD_SAFE
pthread_mutex_lock(&logg_mutex);
#endif
- if(!logg_fd) {
+ if(use_stderr) {
+ logg_fd = stderr;
+ } else if(!logg_fd) {
old_umask = umask(0037);
if((logg_fd = fopen(logg_file, "a")) == NULL) {
umask(old_umask);
@@ -150,7 +152,7 @@
free(timestr);
}
- if(logg_size) {
+ if(logg_size && !use_stderr) {
if(stat(logg_file, &sb) != -1) {
if(sb.st_size > logg_size) {
logg_file = NULL;
diff -ru clamav-0.84/shared/output.h clamav-0.84-new/shared/output.h
--- clamav-0.84/shared/output.h 2005-04-20 01:33:15.000000000 +0200
+++ clamav-0.84-new/shared/output.h 2005-05-04 22:50:01.000000000
+0200
@@ -28,6 +28,7 @@
int mdprintf(int desc, const char *str, ...);
+int use_stderr;
int logg(const char *str, ...);
void logg_close(void);
extern short int logg_verbose, logg_lock, logg_time;
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing'), (33, 'unstable'), (15, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.11.7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages clamav-daemon depends on:
ii clamav-base 0.83-5 base package for clamav, an anti-v
ii clamav-freshclam [clamav-da 0.83-5 downloads clamav virus databases f
ii libbz2-1.0 1.0.2-5 high-quality block-sorting file co
ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries an
ii libclamav1 0.83-5 virus scanner library
ii libcurl3 7.13.2-2 Multi-protocol file transfer libra
ii libgmp3 4.1.4-6 Multiprecision arithmetic library
ii libidn11 0.5.13-1.0 GNU libidn library, implementation
ii libssl0.9.7 0.9.7e-3 SSL shared libraries
ii zlib1g 1:1.2.2-4 compression library - runtime
-- no debconf information
---------------------------------------
Received: (at 307719-done) by bugs.debian.org; 10 May 2005 14:06:17 +0000
>From [EMAIL PROTECTED] Tue May 10 07:06:17 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mail.lobefin.net [216.158.52.98] (Debian-exim)
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1DVVNJ-0003DA-00; Tue, 10 May 2005 07:06:17 -0700
Received: from lobefin.net
([216.158.52.108] helo=www.lobefin.net ident=Debian-exim)
by mail.lobefin.net with asmtp (TLS-1.0:RSA_ARCFOUR_SHA:16)
(Exim 4.34)
id 1DVVNI-0007tc-4Y; Tue, 10 May 2005 10:06:16 -0400
Received: from steve by www.lobefin.net with local (Exim 4.34)
id 1DVVNH-0000Ek-EJ; Tue, 10 May 2005 10:06:15 -0400
Date: Tue, 10 May 2005 10:06:15 -0400
From: Stephen Gran <[EMAIL PROTECTED]>
To: KaalH! <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: Bug#307719: clamav-daemon: Add support for stderr logging
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL
PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo"
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.3.28i
X-Editor: VIM - Vi IMproved 6.1
X-OS: Linux hadrian 2.4.26-2-686-smp i686
X-Uptime: 209 days
X-Latin: Hodie sexto Idus Maias MMDCCLVIII ab urbe condita est
X-Date: Today is Setting Orange, the 57th day of Discord in the YOLD 3171
X-DDate: Only 2431111 Shopping Days Left Before X-Day.
X-Motto: debian/rules
X-Authenticated-Sender: steve
X-Scanned-By: ClamAV at mail.lobefin.net
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER
autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
--envbJBWh7q8WU6mo
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
This one time, at band camp, KaalH! said:
> Stephen Gran a =E9crit :
> > This one time, at band camp, KaalH! said:
> > > hoho, there's no "start-stop-daemon -u clamav" and/or
> > > "start-stop-daemon -c clamav" in /etc/init.d/clamav-daemon, but
> > > clamd runs as clamav user :o
> > >=20
> > > clamd seems to turn himself as clamav user, so it needs to be
> > > lanched as root and not as clamav like i made it with chpst. Is
> > > this correct ?
> > >=20
> > > if so, not using chpst will solve my problem. I hope there's no
> > > security issue doing this ...
> >
> > Yes - clamd will drop priviledges properly shortly before beginning
> > to accept connections. It reads it's configuration file to find out
> > what user to run as.
> >=20
> > So is this considered resolved, or does something need to be done?
> >
> resolved, thanks
OK, great. closing.
-- =20
-----------------------------------------------------------------
| ,''`. Stephen Gran |
| : :' : [EMAIL PROTECTED] |
| `. `' Debian user, admin, and developer |
| `- http://www.debian.org |
-----------------------------------------------------------------
--envbJBWh7q8WU6mo
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFCgL/XSYIMHOpZA44RAqUhAJ9p9QzEzIsY1R7aH5S0nn/pYoujXQCgy9NL
jLcALRa/V6IDVqg5YlYTRbI=
=ZGnL
-----END PGP SIGNATURE-----
--envbJBWh7q8WU6mo--
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]