Bring in sendmail.org code from the future 8.14.2 release which restores
ABI compatibility to users of the libmilter.so shared library.
This commit is contained in:
parent
d0cef73d40
commit
6d13d6cb73
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/sendmail/dist/; revision=168988
@ -855,6 +855,7 @@ st_optionneg(g)
|
|||||||
;
|
;
|
||||||
|
|
||||||
if (g->a_ctx->ctx_smfi != NULL &&
|
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)
|
(fi_negotiate = g->a_ctx->ctx_smfi->xxfi_negotiate) != NULL)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
@ -1177,6 +1178,7 @@ st_data(g)
|
|||||||
if (g == NULL)
|
if (g == NULL)
|
||||||
return _SMFIS_ABORT;
|
return _SMFIS_ABORT;
|
||||||
if (g->a_ctx->ctx_smfi != NULL &&
|
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)
|
(fi_data = g->a_ctx->ctx_smfi->xxfi_data) != NULL)
|
||||||
return (*fi_data)(g->a_ctx);
|
return (*fi_data)(g->a_ctx);
|
||||||
return SMFIS_CONTINUE;
|
return SMFIS_CONTINUE;
|
||||||
@ -1310,6 +1312,7 @@ st_unknown(g)
|
|||||||
if (g == NULL)
|
if (g == NULL)
|
||||||
return _SMFIS_ABORT;
|
return _SMFIS_ABORT;
|
||||||
if (g->a_ctx->ctx_smfi != NULL &&
|
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)
|
(fi_unknown = g->a_ctx->ctx_smfi->xxfi_unknown) != NULL)
|
||||||
return (*fi_unknown)(g->a_ctx, (const char *) g->a_buf);
|
return (*fi_unknown)(g->a_ctx, (const char *) g->a_buf);
|
||||||
return SMFIS_CONTINUE;
|
return SMFIS_CONTINUE;
|
||||||
|
@ -927,9 +927,9 @@ mi_listener(conn, dbg, smfi, timeout, backlog)
|
|||||||
ctx->ctx_pflags |= SMFIP_NOEOH;
|
ctx->ctx_pflags |= SMFIP_NOEOH;
|
||||||
if (smfi->xxfi_body == NULL)
|
if (smfi->xxfi_body == NULL)
|
||||||
ctx->ctx_pflags |= SMFIP_NOBODY;
|
ctx->ctx_pflags |= SMFIP_NOBODY;
|
||||||
if (smfi->xxfi_data == NULL)
|
if (smfi->xxfi_version <= 3 || smfi->xxfi_data == NULL)
|
||||||
ctx->ctx_pflags |= SMFIP_NODATA;
|
ctx->ctx_pflags |= SMFIP_NODATA;
|
||||||
if (smfi->xxfi_unknown == NULL)
|
if (smfi->xxfi_version <= 2 || smfi->xxfi_unknown == NULL)
|
||||||
ctx->ctx_pflags |= SMFIP_NOUNKNOWN;
|
ctx->ctx_pflags |= SMFIP_NOUNKNOWN;
|
||||||
|
|
||||||
#if _FFR_WORKERS_POOL
|
#if _FFR_WORKERS_POOL
|
||||||
|
@ -52,7 +52,10 @@ smfi_register(smfilter)
|
|||||||
(void) sm_strlcpy(smfi->xxfi_name, smfilter.xxfi_name, len);
|
(void) sm_strlcpy(smfi->xxfi_name, smfilter.xxfi_name, len);
|
||||||
|
|
||||||
/* compare milter version with hard coded version */
|
/* 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! */
|
/* hard failure for now! */
|
||||||
smi_log(SMI_LOG_ERR,
|
smi_log(SMI_LOG_ERR,
|
||||||
|
Loading…
Reference in New Issue
Block a user