Config file has changed

git-svn: trunk@462
remotes/push_mirror/metadata
Nigel Horne 21 years ago
parent 3eb41c5dbb
commit 86b3e54231
  1. 4
      clamav-devel/ChangeLog
  2. 2
      clamav-devel/clamav-milter/INSTALL
  3. 35
      clamav-devel/clamav-milter/clamav-milter.c

@ -1,3 +1,7 @@
Wed Mar 31 22:00:05 BST 2004 (njh)
----------------------------------
* clamav-milter: Handle new location of config file parser
Wed Mar 31 18:12:20 BST 2004 (njh)
----------------------------------
* libclamav: Code tidy up - free memory earlier

@ -300,6 +300,8 @@ Changes
out when the remote end (the end talking to
sendmail) is slow
Prefer cli_dbgmsg/cli_warnmsg over printf
0.70d 29/3/04 Print the sendmail ID with the virus note in syslog
config file location has changed
BUG REPORTS

@ -299,9 +299,14 @@
* for timing out when the remote end (the end talking to
* sendmail) is slow
* Prefer cli_dbgmsg/cli_warnmsg over printf
* 0.70d 29/3/04 Print the sendmail ID with the virus note in syslog
* config file location has changed
*
* Change History:
* $Log: clamav-milter.c,v $
* Revision 1.66 2004/03/31 20:48:03 nigelhorne
* Config file has changed
*
* Revision 1.65 2004/03/27 21:44:21 nigelhorne
* Attempt to handle clamd quick timeout for slow remote sites
*
@ -482,9 +487,9 @@
* Revision 1.6 2003/09/28 16:37:23 nigelhorne
* Added -f flag use MaxThreads if --max-children not set
*/
static char const rcsid[] = "$Id: clamav-milter.c,v 1.65 2004/03/27 21:44:21 nigelhorne Exp $";
static char const rcsid[] = "$Id: clamav-milter.c,v 1.66 2004/03/31 20:48:03 nigelhorne Exp $";
#define CM_VERSION "0.70c"
#define CM_VERSION "0.70d"
/*#define CONFDIR "/usr/local/etc"*/
@ -493,7 +498,7 @@ static char const rcsid[] = "$Id: clamav-milter.c,v 1.65 2004/03/27 21:44:21 nig
#endif
#include "defaults.h"
#include "cfgfile.h"
#include "cfgparser.h"
#include "../target.h"
#include "str.h"
#include "../libclamav/others.h"
@ -680,6 +685,7 @@ static int cl_error = SMFIS_TEMPFAIL; /*
static int threadtimeout = CL_DEFAULT_SCANTIMEOUT; /*
* number of seconds to wait for clamd to
* respond
* TODO: consider changing to ReadTimeout
*/
static int logClean = 1; /*
* Add clean items to the log file
@ -1817,6 +1823,7 @@ clamfi_eom(SMFICTX *ctx)
{
int rc = SMFIS_CONTINUE;
char *ptr;
const char *sendmailId;
struct privdata *privdata = (struct privdata *)smfi_getpriv(ctx);
char mess[128];
@ -1892,13 +1899,13 @@ clamfi_eom(SMFICTX *ctx)
close(privdata->cmdSocket);
privdata->cmdSocket = -1;
if(strstr(mess, "ERROR") != NULL) {
sendmailId = smfi_getsymval(ctx, "i");
ptr = smfi_getsymval(ctx, "i");
if(strstr(mess, "ERROR") != NULL) {
cli_warnmsg("%s: %s\n", ptr, mess);
cli_warnmsg("%s: %s\n", sendmailId, mess);
if(use_syslog)
syslog(LOG_ERR, "%s: %s\n", ptr, mess);
syslog(LOG_ERR, "%s: %s\n", sendmailId, mess);
clamfi_cleanup(ctx);
return cl_error;
}
@ -1914,7 +1921,7 @@ clamfi_eom(SMFICTX *ctx)
if(use_syslog && logClean)
/* Include the sendmail queue ID in the log */
syslog(LOG_NOTICE, "%s: clean message from %s",
smfi_getsymval(ctx, "i"),
sendmailId,
(privdata->from) ? privdata->from : "an unknown sender");
if(privdata->body) {
@ -1936,9 +1943,6 @@ clamfi_eom(SMFICTX *ctx)
int i;
char **to, *err;
if(use_syslog)
syslog(LOG_NOTICE, mess);
/*
* Setup err as a list of recipients
*/
@ -1949,7 +1953,8 @@ clamfi_eom(SMFICTX *ctx)
* length of privdata->from and may get a buffre overrun
* causing a crash
*/
snprintf(err, 1024, "Intercepted virus from %s to", privdata->from);
snprintf(err, 1024, "Intercepted virus from %s to",
privdata->from);
ptr = strchr(err, '\0');
@ -1971,9 +1976,7 @@ clamfi_eom(SMFICTX *ctx)
if(use_syslog)
/* Include the sendmail queue ID in the log */
syslog(LOG_NOTICE, "%s: %s",
smfi_getsymval(ctx, "i"),
err);
syslog(LOG_NOTICE, "%s: %s %s", sendmailId, mess, err);
#ifdef CL_DEBUG
cli_dbgmsg("%s\n", err);
#endif
@ -2027,7 +2030,7 @@ clamfi_eom(SMFICTX *ctx)
* information
*/
fprintf(sendmail, "The message %s sent from %s to\n\t",
smfi_getsymval(ctx, "i"), from);
sendmailId, from);
else
fprintf(sendmail, "A message sent from %s to\n\t",
from);

Loading…
Cancel
Save