From a1a2f94771f56b572420195fa969d05b4d1c187f Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Wed, 25 May 2005 19:41:30 +0000 Subject: [PATCH] TEMPFAIL when loading a new database git-svn: trunk@1581 --- clamav-devel/ChangeLog | 5 +++++ clamav-devel/clamav-milter/INSTALL | 2 ++ clamav-devel/clamav-milter/clamav-milter.c | 12 ++++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/clamav-devel/ChangeLog b/clamav-devel/ChangeLog index d0f329a57..49a721ef0 100644 --- a/clamav-devel/ChangeLog +++ b/clamav-devel/ChangeLog @@ -1,3 +1,8 @@ +Wed May 25 20:41:40 BST 2005 (njh) +---------------------------------- + * clamav-milter: When not in external mode, TEMPFAIL when loading a new + database, even when --dont-wait isn't given + Tue May 24 22:24:08 CEST 2005 (tk) ---------------------------------- * clamscan/others.c: enable REG_EXTENDED in match_regex diff --git a/clamav-devel/clamav-milter/INSTALL b/clamav-devel/clamav-milter/INSTALL index 68a58f773..50582b219 100644 --- a/clamav-devel/clamav-milter/INSTALL +++ b/clamav-devel/clamav-milter/INSTALL @@ -810,6 +810,8 @@ Changes 0.85c 24/5/05: Use the program name from argv[0], based on an idea by Joe Maimon When dying use LOG_CRIT rather than LOG_ERR +0.84d 25/5/05: When not in external mode, TEMPFAIL when loading a new + database, even when --dont-wait isn't given 4. INTERNATIONALISATION diff --git a/clamav-devel/clamav-milter/clamav-milter.c b/clamav-devel/clamav-milter/clamav-milter.c index bbb7ce0a1..3cb103e5f 100644 --- a/clamav-devel/clamav-milter/clamav-milter.c +++ b/clamav-devel/clamav-milter/clamav-milter.c @@ -22,9 +22,9 @@ * * For installation instructions see the file INSTALL that came with this file */ -static char const rcsid[] = "$Id: clamav-milter.c,v 1.204 2005/05/24 20:11:26 nigelhorne Exp $"; +static char const rcsid[] = "$Id: clamav-milter.c,v 1.205 2005/05/25 19:39:03 nigelhorne Exp $"; -#define CM_VERSION "0.85c" +#define CM_VERSION "0.85d" #if HAVE_CONFIG_H #include "clamav-config.h" @@ -2000,8 +2000,8 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr) accepting = accept_inputs; pthread_mutex_unlock(&accept_mutex); if(!accepting) { -#if 1 cli_warnmsg("Not accepting inputs at the moment\n"); +#if 0 /* * We must refuse here even if dont_wait isn't set, since * it could take some time, and sendmail could time us out @@ -2016,7 +2016,7 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr) pthread_mutex_unlock(&accept_mutex); cli_warnmsg("Accepting inputs again\n"); #endif - /*return SMFIS_TEMPFAIL;*/ + return SMFIS_TEMPFAIL; } if(ctx == NULL) { @@ -4880,6 +4880,10 @@ loadDatabase(void) assert(!external); if(dbdir == NULL) { + /* + * First time through, find out in which directory the signature + * databases are + */ if((cpt = cfgopt(copt, "DatabaseDirectory")) || (cpt = cfgopt(copt, "DataDirectory"))) dbdir = cpt->strarg; else