Browse code

TEMPFAIL when loading a new database

git-svn: trunk@1581

Nigel Horne authored on 2005/05/26 04:41:30
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Wed May 25 20:41:40 BST 2005 (njh)
2
+----------------------------------
3
+  * clamav-milter:	When not in external mode, TEMPFAIL when loading a new
4
+				database, even when --dont-wait isn't given
5
+
1 6
 Tue May 24 22:24:08 CEST 2005 (tk)
2 7
 ----------------------------------
3 8
   * clamscan/others.c: enable REG_EXTENDED in match_regex
... ...
@@ -810,6 +810,8 @@ Changes
810 810
 0.85c	24/5/05:	Use the program name from argv[0], based on an
811 811
 				idea by Joe Maimon <jmaimon@ttec.com>
812 812
 			When dying use LOG_CRIT rather than LOG_ERR
813
+0.84d	25/5/05:	When not in external mode, TEMPFAIL when loading a new
814
+				database, even when --dont-wait isn't given
813 815
 
814 816
 4. INTERNATIONALISATION
815 817
 
... ...
@@ -22,9 +22,9 @@
22 22
  *
23 23
  * For installation instructions see the file INSTALL that came with this file
24 24
  */
25
-static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.204 2005/05/24 20:11:26 nigelhorne Exp $";
25
+static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.205 2005/05/25 19:39:03 nigelhorne Exp $";
26 26
 
27
-#define	CM_VERSION	"0.85c"
27
+#define	CM_VERSION	"0.85d"
28 28
 
29 29
 #if HAVE_CONFIG_H
30 30
 #include "clamav-config.h"
... ...
@@ -2000,8 +2000,8 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr)
2000 2000
 	accepting = accept_inputs;
2001 2001
 	pthread_mutex_unlock(&accept_mutex);
2002 2002
 	if(!accepting) {
2003
-#if	1
2004 2003
 		cli_warnmsg("Not accepting inputs at the moment\n");
2004
+#if	0
2005 2005
 		/*
2006 2006
 		 * We must refuse here even if dont_wait isn't set, since
2007 2007
 		 * it could take some time, and sendmail could time us out
... ...
@@ -2016,7 +2016,7 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr)
2016 2016
 		pthread_mutex_unlock(&accept_mutex);
2017 2017
 		cli_warnmsg("Accepting inputs again\n");
2018 2018
 #endif
2019
-		/*return SMFIS_TEMPFAIL;*/
2019
+		return SMFIS_TEMPFAIL;
2020 2020
 	}
2021 2021
 
2022 2022
 	if(ctx == NULL) {
... ...
@@ -4880,6 +4880,10 @@ loadDatabase(void)
4880 4880
 	assert(!external);
4881 4881
 
4882 4882
 	if(dbdir == NULL) {
4883
+		/*
4884
+		 * First time through, find out in which directory the signature
4885
+		 * databases are
4886
+		 */
4883 4887
 		if((cpt = cfgopt(copt, "DatabaseDirectory")) || (cpt = cfgopt(copt, "DataDirectory")))
4884 4888
 			dbdir = cpt->strarg;
4885 4889
 		else