X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/31f5b3492bde6a055c0c349a3d46718bd5a7e4f0..cb45303cf2a8d9922702f13db42b3285c48f6aa7:/src/src/dmarc.c diff --git a/src/src/dmarc.c b/src/src/dmarc.c index 750f9197f..1bbaa7718 100644 --- a/src/src/dmarc.c +++ b/src/src/dmarc.c @@ -3,7 +3,7 @@ *************************************************/ /* DMARC support. Copyright (c) Todd Lyons 2012 - 2014 - Copyright (c) The Exim Maintainers 2019 + Copyright (c) The Exim Maintainers 2019 - 2021 License: GPL */ /* Portions Copyright (c) 2012, 2013, The Trusted Domain Project; @@ -53,14 +53,12 @@ static dmarc_exim_p dmarc_policy_description[] = { }; -void -dmarc_version_report(FILE *f) +gstring * +dmarc_version_report(gstring * g) { -const char *implementation, *version; - -fprintf(f, "Library version: dmarc: Compile: %d.%d.%d.%d\n", - (OPENDMARC_LIB_VERSION & 0xff000000) >> 24, (OPENDMARC_LIB_VERSION & 0x00ff0000) >> 16, - (OPENDMARC_LIB_VERSION & 0x0000ff00) >> 8, OPENDMARC_LIB_VERSION & 0x000000ff); +return string_fmt_append(g, "Library version: dmarc: Compile: %d.%d.%d.%d\n", + (OPENDMARC_LIB_VERSION & 0xff000000) >> 24, (OPENDMARC_LIB_VERSION & 0x00ff0000) >> 16, + (OPENDMARC_LIB_VERSION & 0x0000ff00) >> 8, OPENDMARC_LIB_VERSION & 0x000000ff); } @@ -233,7 +231,7 @@ if (rc == DNS_SUCCEED) if (rr->type == T_TXT && rr->size > 3) { store_free_dns_answer(dnsa); - return string_copyn_taint(US rr->data, rr->size, TRUE); + return string_copyn_taint(US rr->data, rr->size, GET_TAINTED); } store_free_dns_answer(dnsa); return NULL; @@ -254,7 +252,7 @@ if (!dmarc_history_file) DEBUG(D_receive) debug_printf("DMARC history file not set\n"); return DMARC_HIST_DISABLED; } -history_file_fd = log_create_as_exim(dmarc_history_file); +history_file_fd = log_open_as_exim(dmarc_history_file); if (history_file_fd < 0) { @@ -532,7 +530,7 @@ if (!dmarc_abort && !sender_host_authenticated) /* Can't use exim's string manipulation functions so allocate memory for libopendmarc using its max hostname length definition. */ - dmarc_domain = store_get(DMARC_MAXHOSTNAMELEN, TRUE); + dmarc_domain = store_get(DMARC_MAXHOSTNAMELEN, GET_TAINTED); libdm_status = opendmarc_policy_fetch_utilized_domain(dmarc_pctx, dmarc_domain, DMARC_MAXHOSTNAMELEN-1); store_release_above(dmarc_domain + Ustrlen(dmarc_domain)+1);