Browse code

Handle sendmail variables after clamav variables

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@891 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/09/18 00:43:12
Showing 3 changed files
... ...
@@ -1,6 +1,13 @@
1
+Fri Sep 17 16:42:06 BST 2004 (njh)
2
+----------------------------------
3
+  * clamav-milter:	Fix problem in the template file handling where sendmail
4
+				variables did't work after clamav variables.
5
+				Thanks to "Sergey Y. Afonin" <asy@kraft-s.ru>
6
+				for pointing this out
7
+
1 8
 Fri Sep 17 14:47:53 BST 2004 (njh)
2 9
 ----------------------------------
3
-  * libclamav:	Scan  yEnc mime attachments
10
+  * libclamav:	Scan yEnc mime attachments
4 11
 
5 12
 Fri Sep 17 11:56:58 BST 2004 (njh)
6 13
 ----------------------------------
... ...
@@ -492,7 +492,9 @@ Changes
492 492
 			environment.
493 493
 0.75p	13/9/04	Updated SESSION code.
494 494
 0.75q	13/9/04	Use pthread_cond_broadcast() instead of pthread_cond_signal()
495
-0.75r	15/9/04	--help didn't include information about --max-children
495
+0.75r	17/9/04	--help didn't include information about --max-children
496
+		Fix problem in the template file handling where sendmail
497
+		variables did't work after clamav variables.
496 498
 
497 499
 INTERNATIONALISATION
498 500
 
... ...
@@ -26,6 +26,9 @@
26 26
  *
27 27
  * Change History:
28 28
  * $Log: clamav-milter.c,v $
29
+ * Revision 1.129  2004/09/17 15:40:02  nigelhorne
30
+ * Handle sendmail variables after clamav variables
31
+ *
29 32
  * Revision 1.128  2004/09/15 08:46:33  nigelhorne
30 33
  * Added --max-children to --help
31 34
  *
... ...
@@ -395,7 +398,7 @@
395 395
  * Revision 1.6  2003/09/28 16:37:23  nigelhorne
396 396
  * Added -f flag use MaxThreads if --max-children not set
397 397
  */
398
-static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.128 2004/09/15 08:46:33 nigelhorne Exp $";
398
+static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.129 2004/09/17 15:40:02 nigelhorne Exp $";
399 399
 
400 400
 #define	CM_VERSION	"0.75r"
401 401
 
... ...
@@ -3489,6 +3492,7 @@ sendtemplate(SMFICTX *ctx, const char *filename, FILE *sendmail, const char *vir
3489 3489
 							filename, *ptr);
3490 3490
 						break;
3491 3491
 				}
3492
+				break;
3492 3493
 			case '$': /* sendmail string */ {
3493 3494
 				const char *val;
3494 3495
 				char *end = strchr(++ptr, '$');
... ...
@@ -3511,6 +3515,7 @@ sendtemplate(SMFICTX *ctx, const char *filename, FILE *sendmail, const char *vir
3511 3511
 				} else
3512 3512
 					fputs(val, sendmail);
3513 3513
 				ptr = end;
3514
+				break;
3514 3515
 			}
3515 3516
 			case '\\':
3516 3517
 				if(*++ptr == '\0') {
... ...
@@ -3745,8 +3750,9 @@ watchdog(void *a)
3745 3745
 		 * How often (in seconds) to try to fix broken clamd sessions.
3746 3746
 		 * We may try more often than this e.g. when we're idle or all
3747 3747
 		 * connections are down, so you can put this figure quite high.
3748
-		 * But can't be too high because a SESSION doesn't remain
3749
-		 * open if no data goes down for ReadTimeout seconds
3748
+		 * But can't be too high because with older clamd SESSION
3749
+		 * didn't remain open if no data goes down for ReadTimeout
3750
+		 * seconds
3750 3751
 		 */
3751 3752
 		ts.tv_sec = tp.tv_sec + readTimeout - 1;
3752 3753
 		ts.tv_nsec = tp.tv_usec * 1000;