On Sat, Feb 14, 2015 at 03:57:19PM +1100, Joshua Root wrote: > In the 3.0.0 release, line 4028 of src/smtpd/smtpd.c references > state->tls_context, but unlike other such references in this file, it is > not wrapped in an #ifdef USE_TLS. This causes compilation to fail when > building with SASL support but without TLS: > > smtpd.c:4028:13: error: no member named 'tls_context' in 'SMTPD_STATE' > if (state->tls_context == 0) /* TLS from XCLIENT > proxy? */ > ~~~~~ ^ > > This is a regression since 2.11.3. I won't attempt a patch since I'm not > familiar with the code.
Proposed (fix some date typos in the HISTORY file first): diff --git a/HISTORY b/HISTORY index 7585c0a..e8e210c 100644 --- a/HISTORY +++ b/HISTORY @@ -21453,7 +21453,7 @@ Apologies for any names omitted. tls/tls_client.c, util/dict_alloc.c, util/dict_open.c, util/match_list.c. -20150214 +20150124 Workaround: nroff has been improved so that "-" comes out as some non-ASCII character, unlike HTML where it comes out @@ -21461,12 +21461,12 @@ Apologies for any names omitted. hops to generate HTML and nroff input from the same source text. Files; mantools/srctoman, mantools/postconf2man. -20150524 +20150124 Cleanup: UTF-8 support in masquerade_domains. File: cleanup/cleanup_masquerade.c. -20150525 +20150125 Cleanup: simplified the casefold() API: no input-dependent failure modes. Files: cleanup/cleanup_masquerade.c, Then make the reported use of the TLS context depend on #ifdef USE_TLS: diff --git a/src/smtpd/smtpd.c b/src/smtpd/smtpd.c index 6a704b4..8f3a996 100644 --- a/src/smtpd/smtpd.c +++ b/src/smtpd/smtpd.c @@ -4025,12 +4025,15 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv) if (got_login) saved_username = mystrdup(state->sasl_username); smtpd_sasl_deactivate(state); - if (state->tls_context == 0) /* TLS from XCLIENT proxy? */ - smtpd_sasl_activate(state, VAR_SMTPD_SASL_OPTS, - var_smtpd_sasl_opts); - else +#ifdef USE_TLS + if (state->tls_context != 0) /* TLS from XCLIENT proxy? */ smtpd_sasl_activate(state, VAR_SMTPD_SASL_TLS_OPTS, var_smtpd_sasl_tls_opts); + else +#else + smtpd_sasl_activate(state, VAR_SMTPD_SASL_OPTS, + var_smtpd_sasl_opts); +#endif if (got_login) { smtpd_sasl_auth_extern(state, saved_username, XCLIENT_CMD); myfree(saved_username); -- Viktor.