summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2007-04-23 22:11:27 +0000
committergshapiro <gshapiro@FreeBSD.org>2007-04-23 22:11:27 +0000
commitaa505d3510c578ec6b798804d9b15cfbf9976535 (patch)
treee802696b2f76be690c37bf6b12fa2a51b83d8bff /contrib/sendmail
parent3094ba12011e3ef8f8ab7071f843a1c1b04b4ea1 (diff)
parent5a96165569a4f07693169fc1320a3dadd88e3dd3 (diff)
downloadFreeBSD-src-aa505d3510c578ec6b798804d9b15cfbf9976535.zip
FreeBSD-src-aa505d3510c578ec6b798804d9b15cfbf9976535.tar.gz
This commit was generated by cvs2svn to compensate for changes in r168988,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/sendmail')
-rw-r--r--contrib/sendmail/libmilter/engine.c3
-rw-r--r--contrib/sendmail/libmilter/listener.c4
-rw-r--r--contrib/sendmail/libmilter/main.c5
3 files changed, 9 insertions, 3 deletions
diff --git a/contrib/sendmail/libmilter/engine.c b/contrib/sendmail/libmilter/engine.c
index a61cf56..f07195d 100644
--- a/contrib/sendmail/libmilter/engine.c
+++ b/contrib/sendmail/libmilter/engine.c
@@ -855,6 +855,7 @@ st_optionneg(g)
;
if (g->a_ctx->ctx_smfi != NULL &&
+ g->a_ctx->ctx_smfi->xxfi_version > 4 &&
(fi_negotiate = g->a_ctx->ctx_smfi->xxfi_negotiate) != NULL)
{
int r;
@@ -1177,6 +1178,7 @@ st_data(g)
if (g == NULL)
return _SMFIS_ABORT;
if (g->a_ctx->ctx_smfi != NULL &&
+ g->a_ctx->ctx_smfi->xxfi_version > 3 &&
(fi_data = g->a_ctx->ctx_smfi->xxfi_data) != NULL)
return (*fi_data)(g->a_ctx);
return SMFIS_CONTINUE;
@@ -1310,6 +1312,7 @@ st_unknown(g)
if (g == NULL)
return _SMFIS_ABORT;
if (g->a_ctx->ctx_smfi != NULL &&
+ g->a_ctx->ctx_smfi->xxfi_version > 2 &&
(fi_unknown = g->a_ctx->ctx_smfi->xxfi_unknown) != NULL)
return (*fi_unknown)(g->a_ctx, (const char *) g->a_buf);
return SMFIS_CONTINUE;
diff --git a/contrib/sendmail/libmilter/listener.c b/contrib/sendmail/libmilter/listener.c
index cf98361..f3eff49 100644
--- a/contrib/sendmail/libmilter/listener.c
+++ b/contrib/sendmail/libmilter/listener.c
@@ -927,9 +927,9 @@ mi_listener(conn, dbg, smfi, timeout, backlog)
ctx->ctx_pflags |= SMFIP_NOEOH;
if (smfi->xxfi_body == NULL)
ctx->ctx_pflags |= SMFIP_NOBODY;
- if (smfi->xxfi_data == NULL)
+ if (smfi->xxfi_version <= 3 || smfi->xxfi_data == NULL)
ctx->ctx_pflags |= SMFIP_NODATA;
- if (smfi->xxfi_unknown == NULL)
+ if (smfi->xxfi_version <= 2 || smfi->xxfi_unknown == NULL)
ctx->ctx_pflags |= SMFIP_NOUNKNOWN;
#if _FFR_WORKERS_POOL
diff --git a/contrib/sendmail/libmilter/main.c b/contrib/sendmail/libmilter/main.c
index d3150d1..5a66102 100644
--- a/contrib/sendmail/libmilter/main.c
+++ b/contrib/sendmail/libmilter/main.c
@@ -52,7 +52,10 @@ smfi_register(smfilter)
(void) sm_strlcpy(smfi->xxfi_name, smfilter.xxfi_name, len);
/* compare milter version with hard coded version */
- if (smfi->xxfi_version != SMFI_VERSION)
+ if (smfi->xxfi_version != SMFI_VERSION &&
+ smfi->xxfi_version != 2 &&
+ smfi->xxfi_version != 3 &&
+ smfi->xxfi_version != 4)
{
/* hard failure for now! */
smi_log(SMI_LOG_ERR,
OpenPOWER on IntegriCloud