Updated mail/opendmarc to 1.4.0beta1 Change since 1.3.1 from RELEASE_NOTES 1.4.0 2018/06/?? Add ARC support. Extensive work contributed by ValiMail. Add "DomainWhitelist" and "DomainWhitelistFile" config options. Extract client IP address for ARC reports when provided via Authentication-Results. Update SQL schema to support new reporting functionality for DKIM selectors and ARC local policy overrides (refer to the example schema.mysql file). Add experimental support for reporting of ARC local policy overrides. Add support for recording and reporting of DKIM selectors. Override a DMARC "fail" if an ARC "pass" is recorded in conjunction with an ARC policy pass. Fix bug #137: Handle base64 inside AR tokens that are values. Problem reported by Joseph Coffland. LIBOPENDMARC: Fix bug #203: Reject DMARC records that have duplicate tags in them. Reported by Dirk Stoecker. REPORTS: Feature request #146: Add option to pull input from a file. REPORTS: Fix bug #153: Suppress duplicate results from the same domain. Patch from Tomki Camp. 1.3.2 2017/03/04 Feature request #86: Change meaning of "RequiredHeaders" such that header validity is always checked, but messages are only rejected on that basis when the flag is set. Based on a patch from Andreas Schulze. Feature request #127: Log SPF results when rejecting. Requested by Patrick Wagner; patch from Andreas Schulze, follow-up patch from Juri Haberland. Feature request #138: Inculde policy and disposition information in an Authentication-Results comment. Based on a patch from Juri Haberland. Feature request #139: Include the client host name if known in failure reports. Suggested by Roland Turner; patch by Andreas Schulze. Fix bug #95: Assume IPv6 for SPF operations. Patch from Juri Haberland. Fix bug #120: Fix control logic around the SPF result. Reported by Christophe Wolfhugel; patch from Andreas Schulze. Fix bug #122: Don't skip the HELO milter phase when SPF is enabled. Reported by Christophe Wolfhugel. Fix bug #157: Fix logging of implicit authserv-ids. Reported by Andreas Schulze; patch from Juri Haberland. Fix bug #158: Log ignored connections. Patch from Andreas Schulze. Fix bug #160: Fix "SyslogFacility" handling. Patch from Juri Haberland. Fix bug #163: Use a larger buffer for the raw MAIL FROM value. Based on a patch from Andreas Schulze. Fix bug #174: Trim "!" suffixes from reporting addresses. Problem noted by Juri Haberland. Fix bug #186: When reloading the configuration file, the public suffix list was read in with the wrong comment indicator. Patch from Federico Omoto. Fix bug #194: Fix inappropriate DMARC status when "p=none" is discovered. Patch from Juri Haberland. Fix bug #195: When parsing Received-SPF, use the correct constants in the history file entries. Patch from Juri Haberland. LIBOPENDMARC: Fix bug #115: Fix type mismatch. Patch from Sebastian A. Siewior via Scott Kitterman. LIBOPENDMARC: Fix bug #121: Fix IPv6 CIDR matching in SPF code. Patch from Christophe Wolfhugel. LIBOPENDMARC: Fix bug #125: Compile time IPv6 fix. Reported by Christophe Wolfhugel. LIBOPENDMARC: Fix bug #131: Fix alignment bug. Patch from Andreas Schulze. LIBOPENDMARC: Fix bug #147: Fix stripping of whitespace from DMARC DNS records. Based on a patch from Job Noorman. LIBOPENDMARC: Fix bug #149: Apply "sp" setting, if present and applicable. Patch from Petr Novak. LIBOPENDMARC: Fix bug #154: Fix "rf" and "fo" processing logic. LIBOPENDMARC: Fix bug #156: Fix variable name. Patch by Andreas Schulze. LIBOPENDMARC: Fix bug #165: Fix logic in checking which SPF identifier was used. Patches from Marco Favero and Juri Haberland. LIBOPENDMARC: Fix bug #167: Don't return "fail" when we should return "none". Patch from Marco Favero. REPORTS: Fix bug #134: Handle SMTP errors correctly. Patch from Andreas Schulze. REPORTS: Fix bug #141: Set the HELO parameter correctly. Reported by Alan Smith; patch from Andreas Schulze. REPORTS: Fix bug #143: Fix logic in table truncation. Reported by Wayne Andersen; patch from Juri Haberland. REPORTS: Fix bug #162: Always report "sp" in aggregate reports. Patch from Juri Haberland. REPORTS: Fix bug #166: Fix report start/end time logic. Patch from Juri Haberland. REPORTS: Fix bug #188: Don't delete inputs too early in opendmarc-reports. Patch from Juri Haberland. TOOLS: Fix bug #161: "Forensic" reports were renamed "Failure" reports. Patch from Andreas Schulze. TOOLS: Fix bug #164: Handle IPv6 test addresses. Reported by Andreas Schulze; patch from Juri Haberland. DOCS: Patch #189: Replace the DMARC RFC with an HTML page referencing the relevant specs, since Debian doesn't consider RFCs to be "free". Patch from Scott Kitterman via Juri Haberland.diff -r1.6848 -r1.6849 pkgsrc/doc/CHANGES-2020
(manu)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: CHANGES-2020,v 1.6848 2020/12/22 00:29:08 gutteridge Exp $ | 1 | $NetBSD: CHANGES-2020,v 1.6849 2020/12/24 01:10:22 manu Exp $ | |
2 | 2 | |||
3 | Changes to the packages collection and infrastructure in 2020: | 3 | Changes to the packages collection and infrastructure in 2020: | |
4 | 4 | |||
5 | Updated devel/p5-Date-Manip to 6.79 [mef 2020-01-01] | 5 | Updated devel/p5-Date-Manip to 6.79 [mef 2020-01-01] | |
6 | Updated devel/p5-IO-Async to 0.75 [mef 2020-01-01] | 6 | Updated devel/p5-IO-Async to 0.75 [mef 2020-01-01] | |
7 | Updated devel/samurai to 1.0 [ng0 2020-01-01] | 7 | Updated devel/samurai to 1.0 [ng0 2020-01-01] | |
8 | Updated www/nsm to 1.25 [ng0 2020-01-01] | 8 | Updated www/nsm to 1.25 [ng0 2020-01-01] | |
9 | Updated textproc/json-yaml to 1.2.1 [sjmulder 2020-01-01] | 9 | Updated textproc/json-yaml to 1.2.1 [sjmulder 2020-01-01] | |
10 | Updated security/doas to 6.2p4 [ng0 2020-01-01] | 10 | Updated security/doas to 6.2p4 [ng0 2020-01-01] | |
11 | Updated devel/p5-B-Keywords to 1.21 [mef 2020-01-01] | 11 | Updated devel/p5-B-Keywords to 1.21 [mef 2020-01-01] | |
12 | Updated devel/p5-EV to 4.31 [mef 2020-01-01] | 12 | Updated devel/p5-EV to 4.31 [mef 2020-01-01] | |
13 | Updated security/sudo to 1.8.30 [kim 2020-01-01] | 13 | Updated security/sudo to 1.8.30 [kim 2020-01-01] | |
14 | Removed graphics/qiviewer [kamil 2020-01-01] | 14 | Removed graphics/qiviewer [kamil 2020-01-01] | |
@@ -9913,13 +9913,14 @@ Changes to the packages collection and i | @@ -9913,13 +9913,14 @@ Changes to the packages collection and i | |||
9913 | Updated devel/gobject-introspection to 1.66.1 [prlw1 2020-12-20] | 9913 | Updated devel/gobject-introspection to 1.66.1 [prlw1 2020-12-20] | |
9914 | Updated net/powerdns to 4.4.0 [otis 2020-12-21] | 9914 | Updated net/powerdns to 4.4.0 [otis 2020-12-21] | |
9915 | Updated textproc/py-Unidecode to 1.1.2 [adam 2020-12-21] | 9915 | Updated textproc/py-Unidecode to 1.1.2 [adam 2020-12-21] | |
9916 | Updated devel/py-coverage to 5.3.1 [adam 2020-12-21] | 9916 | Updated devel/py-coverage to 5.3.1 [adam 2020-12-21] | |
9917 | Updated www/py-uvicorn to 0.13.2 [adam 2020-12-21] | 9917 | Updated www/py-uvicorn to 0.13.2 [adam 2020-12-21] | |
9918 | Updated lang/nodejs to 14.15.3 [adam 2020-12-21] | 9918 | Updated lang/nodejs to 14.15.3 [adam 2020-12-21] | |
9919 | Updated archivers/R-zip to 2.1.1 [mef 2020-12-21] | 9919 | Updated archivers/R-zip to 2.1.1 [mef 2020-12-21] | |
9920 | Updated security/R-openssl to 1.4.3 [mef 2020-12-21] | 9920 | Updated security/R-openssl to 1.4.3 [mef 2020-12-21] | |
9921 | Added graphics/pastel version 0.8.0 [pin 2020-12-21] | 9921 | Added graphics/pastel version 0.8.0 [pin 2020-12-21] | |
9922 | Updated x11/kitty to 0.19.3 [pin 2020-12-21] | 9922 | Updated x11/kitty to 0.19.3 [pin 2020-12-21] | |
9923 | Added security/R-credentials version 1.3.0 [mef 2020-12-21] | 9923 | Added security/R-credentials version 1.3.0 [mef 2020-12-21] | |
9924 | mk/bsd.pkg.mk: started freeze for pkgsrc-2020Q4 branch [gdt 2020-12-21] | 9924 | mk/bsd.pkg.mk: started freeze for pkgsrc-2020Q4 branch [gdt 2020-12-21] | |
9925 | Updated x11/xfce4-notifyd to 0.6.2nb1 [gutteridge 2020-12-22] | 9925 | Updated x11/xfce4-notifyd to 0.6.2nb1 [gutteridge 2020-12-22] | |
9926 | Updated mail/opendmarc to 1.4.0beta1 [manu 2020-12-24] |
@@ -1,44 +1,57 @@ | @@ -1,44 +1,57 @@ | |||
1 | # $NetBSD: Makefile,v 1.21 2020/08/31 18:09:59 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.22 2020/12/24 01:10:23 manu Exp $ | |
2 | 2 | |||
3 | DISTNAME= opendmarc-1.3.1 | 3 | GITHUB_PROJECT= OpenDMARC | |
4 | PKGREVISION= 9 | 4 | GITHUB_TAG= rel-opendmarc-1-4-0-Beta1 | |
5 | DISTNAME= rel-opendmarc-1-4-0-Beta1 | |||
6 | PKGNAME= opendmarc-1.4.0b1 | |||
7 | #PKGREVISION= 1 | |||
5 | CATEGORIES= mail | 8 | CATEGORIES= mail | |
6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=opendmarc/} | 9 | MASTER_SITES= ${MASTER_SITE_GITHUB:=trusteddomainproject/} | |
10 | DIST_SUBDIR= ${GITHUB_PROJECT} | |||
7 | 11 | |||
8 | MAINTAINER= pettai@NetBSD.org | 12 | MAINTAINER= pettai@NetBSD.org | |
9 | HOMEPAGE= http://www.trusteddomain.org/opendmarc/ | 13 | HOMEPAGE= http://www.trusteddomain.org/opendmarc/ | |
10 | COMMENT= Open source DMARC library, MTA filter implementation and tools | 14 | COMMENT= Open source DMARC library, MTA filter implementation and tools | |
11 | LICENSE= modified-bsd | 15 | LICENSE= modified-bsd | |
12 | 16 | |||
13 | DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI | 17 | DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI | |
14 | DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql | 18 | DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql | |
15 | #DEPENDS+= {perl>=5.6.1,p5-File-Temp-[0-9]*}:../../devel/p5-File-Temp | 19 | #DEPENDS+= {perl>=5.6.1,p5-File-Temp-[0-9]*}:../../devel/p5-File-Temp | |
16 | DEPENDS+= p5-Switch-[0-9]*:../../lang/p5-Switch | 20 | DEPENDS+= p5-Switch-[0-9]*:../../lang/p5-Switch | |
17 | DEPENDS+= p5-HTTP-Message-[0-9]*:../../www/p5-HTTP-Message | 21 | DEPENDS+= p5-HTTP-Message-[0-9]*:../../www/p5-HTTP-Message | |
18 | 22 | |||
19 | RCD_SCRIPTS= opendmarc | 23 | RCD_SCRIPTS= opendmarc | |
20 | 24 | |||
21 | USE_LIBTOOL= yes | 25 | USE_LIBTOOL= yes | |
22 | USE_TOOLS+= perl | 26 | USE_TOOLS+= perl autoconf automake | |
23 | 27 | |||
24 | GNU_CONFIGURE= yes | 28 | GNU_CONFIGURE= yes | |
25 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | 29 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | |
26 | CONFIGURE_ARGS+= --with-milter=${BUILDLINK_PREFIX.libmilter} | 30 | CONFIGURE_ARGS+= --with-milter=${BUILDLINK_PREFIX.libmilter} | |
31 | CONFIGURE_ARGS+= --with-spf | |||
32 | CONFIGURE_ARGS+= --with-spf2-lib=${BUILDLINK_PREFIX.libspf2}/lib | |||
33 | CONFIGURE_ARGS+= --with-spf2-include=${BUILDLINK_PREFIX.libspf2}/include/spf2 | |||
27 | 34 | |||
28 | REPLACE_PERL= reports/opendmarc-expire.in | 35 | REPLACE_PERL= reports/opendmarc-expire.in | |
29 | REPLACE_PERL+= reports/opendmarc-import.in | 36 | REPLACE_PERL+= reports/opendmarc-import.in | |
30 | REPLACE_PERL+= reports/opendmarc-params.in | 37 | REPLACE_PERL+= reports/opendmarc-params.in | |
31 | REPLACE_PERL+= reports/opendmarc-reports.in | 38 | REPLACE_PERL+= reports/opendmarc-reports.in | |
32 | 39 | |||
33 | EGDIR= ${PREFIX}/share/examples/${PKGBASE} | 40 | EGDIR= ${PREFIX}/share/examples/${PKGBASE} | |
34 | 41 | |||
35 | INSTALLATION_DIRS= ${EGDIR} | 42 | INSTALLATION_DIRS= ${EGDIR} | |
36 | 43 | |||
44 | pre-configure: | |||
45 | set -e; cd ${WRKSRC}; \ | |||
46 | libtoolize; aclocal; autoheader; automake -a --foreign -i; autoconf | |||
47 | ||||
37 | post-install: | 48 | post-install: | |
38 | ${INSTALL_DATA} ${WRKSRC}/opendmarc/opendmarc.conf.sample \ | 49 | ${INSTALL_DATA} ${WRKSRC}/opendmarc/opendmarc.conf.sample \ | |
39 | ${DESTDIR}${EGDIR}/ | 50 | ${DESTDIR}${EGDIR}/ | |
40 | 51 | |||
41 | .include "../../security/openssl/buildlink3.mk" | 52 | .include "../../security/openssl/buildlink3.mk" | |
53 | BUILDLINK_API_DEPENDS.libmilter+= libmilter>=8.13.0 | |||
42 | .include "../../mail/libmilter/buildlink3.mk" | 54 | .include "../../mail/libmilter/buildlink3.mk" | |
55 | .include "../../mail/libspf2/buildlink3.mk" | |||
43 | .include "../../mk/pthread.buildlink3.mk" | 56 | .include "../../mk/pthread.buildlink3.mk" | |
44 | .include "../../mk/bsd.pkg.mk" | 57 | .include "../../mk/bsd.pkg.mk" |
@@ -1,45 +1,45 @@ | @@ -1,45 +1,45 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.5 2015/03/15 22:26:34 pettai Exp $ | 1 | @comment $NetBSD: PLIST,v 1.6 2020/12/24 01:10:23 manu Exp $ | |
2 | include/opendmarc/dmarc.h | 2 | include/opendmarc/dmarc.h | |
3 | lib/libopendmarc.la | 3 | lib/libopendmarc.la | |
4 | man/man5/opendmarc.conf.5 | 4 | man/man5/opendmarc.conf.5 | |
5 | man/man8/opendmarc-check.8 | 5 | man/man8/opendmarc-check.8 | |
6 | man/man8/opendmarc-expire.8 | 6 | man/man8/opendmarc-expire.8 | |
7 | man/man8/opendmarc-import.8 | 7 | man/man8/opendmarc-import.8 | |
8 | man/man8/opendmarc-importstats.8 | 8 | man/man8/opendmarc-importstats.8 | |
9 | man/man8/opendmarc-params.8 | 9 | man/man8/opendmarc-params.8 | |
10 | man/man8/opendmarc-reports.8 | 10 | man/man8/opendmarc-reports.8 | |
11 | man/man8/opendmarc.8 | 11 | man/man8/opendmarc.8 | |
12 | sbin/opendmarc | 12 | sbin/opendmarc | |
13 | sbin/opendmarc-check | 13 | sbin/opendmarc-check | |
14 | sbin/opendmarc-expire | 14 | sbin/opendmarc-expire | |
15 | sbin/opendmarc-import | 15 | sbin/opendmarc-import | |
16 | sbin/opendmarc-importstats | 16 | sbin/opendmarc-importstats | |
17 | sbin/opendmarc-params | 17 | sbin/opendmarc-params | |
18 | sbin/opendmarc-reports | 18 | sbin/opendmarc-reports | |
19 | share/doc/opendmarc/LICENSE | 19 | share/doc/opendmarc/LICENSE | |
20 | share/doc/opendmarc/LICENSE.Sendmail | 20 | share/doc/opendmarc/LICENSE.Sendmail | |
21 | share/doc/opendmarc/README | 21 | share/doc/opendmarc/README | |
22 | share/doc/opendmarc/README.rddmarc | 22 | share/doc/opendmarc/README.rddmarc | |
23 | share/doc/opendmarc/README.schema | 23 | share/doc/opendmarc/README.schema | |
24 | share/doc/opendmarc/README.specs.html | |||
24 | share/doc/opendmarc/dmarc_policy_t.html | 25 | share/doc/opendmarc/dmarc_policy_t.html | |
25 | share/doc/opendmarc/dmarcfail.py | 26 | share/doc/opendmarc/dmarcfail.py | |
26 | share/doc/opendmarc/draft-dmarc-base-13.txt | |||
27 | share/doc/opendmarc/index.html | 27 | share/doc/opendmarc/index.html | |
28 | share/doc/opendmarc/mkdb.mysql | |||
29 | share/doc/opendmarc/mkdmarc | 28 | share/doc/opendmarc/mkdmarc | |
30 | share/doc/opendmarc/mysql_ip6.c | 29 | share/doc/opendmarc/mysql_ip6.c | |
31 | share/doc/opendmarc/opendmarc | 30 | share/doc/opendmarc/opendmarc | |
32 | share/doc/opendmarc/opendmarc.conf.sample | 31 | share/doc/opendmarc/opendmarc.conf.sample | |
32 | share/doc/opendmarc/opendmarc.service.in | |||
33 | share/doc/opendmarc/opendmarc.spec.in | 33 | share/doc/opendmarc/opendmarc.spec.in | |
34 | share/doc/opendmarc/opendmarc_dns_fake_record.html | 34 | share/doc/opendmarc/opendmarc_dns_fake_record.html | |
35 | share/doc/opendmarc/opendmarc_get_policy_to_enforce.html | 35 | share/doc/opendmarc/opendmarc_get_policy_to_enforce.html | |
36 | share/doc/opendmarc/opendmarc_lib_t.html | 36 | share/doc/opendmarc/opendmarc_lib_t.html | |
37 | share/doc/opendmarc/opendmarc_policy_connect_clear.html | 37 | share/doc/opendmarc/opendmarc_policy_connect_clear.html | |
38 | share/doc/opendmarc/opendmarc_policy_connect_init.html | 38 | share/doc/opendmarc/opendmarc_policy_connect_init.html | |
39 | share/doc/opendmarc/opendmarc_policy_connect_rset.html | 39 | share/doc/opendmarc/opendmarc_policy_connect_rset.html | |
40 | share/doc/opendmarc/opendmarc_policy_connect_shutdown.html | 40 | share/doc/opendmarc/opendmarc_policy_connect_shutdown.html | |
41 | share/doc/opendmarc/opendmarc_policy_fetch_adkim.html | 41 | share/doc/opendmarc/opendmarc_policy_fetch_adkim.html | |
42 | share/doc/opendmarc/opendmarc_policy_fetch_alignment.html | 42 | share/doc/opendmarc/opendmarc_policy_fetch_alignment.html | |
43 | share/doc/opendmarc/opendmarc_policy_fetch_aspf.html | 43 | share/doc/opendmarc/opendmarc_policy_fetch_aspf.html | |
44 | share/doc/opendmarc/opendmarc_policy_fetch_fo.html | 44 | share/doc/opendmarc/opendmarc_policy_fetch_fo.html | |
45 | share/doc/opendmarc/opendmarc_policy_fetch_p.html | 45 | share/doc/opendmarc/opendmarc_policy_fetch_p.html |
@@ -1,11 +1,9 @@ | @@ -1,11 +1,9 @@ | |||
1 | $NetBSD: distinfo,v 1.7 2020/07/27 20:41:09 oster Exp $ | 1 | $NetBSD: distinfo,v 1.8 2020/12/24 01:10:23 manu Exp $ | |
2 | 2 | |||
3 | SHA1 (opendmarc-1.3.1.tar.gz) = bdd12713888c16e77334281238f88990df225929 | 3 | SHA1 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 74ad1ef9f9a12b5fadef5919807cd55f7655d8d8 | |
4 | RMD160 (opendmarc-1.3.1.tar.gz) = 623b51544f428ade14f0a5d6204f8bf41af8375a | 4 | RMD160 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = e8dda5350a734509843a04329777478d9410b796 | |
5 | SHA512 (opendmarc-1.3.1.tar.gz) = 0be11540bc26bd3b3e6cc9817bc379a5d290b63ef16c5d3559bf96b241ad6628bea7a9daeb468afac855bc16be16676f722b3c1d468ea82c8d8364e8a8137226 | 5 | SHA512 (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = d562050da9c4b96e7707157fbbf385ab3ac551cf07754b45deb6a010b4c47e7f478dfe35bc2c8625f6553af4fbf120820bf2a9f0ce246b26cabf81e7d1174405 | |
6 | Size (opendmarc-1.3.1.tar.gz) = 640151 bytes | 6 | Size (OpenDMARC/rel-opendmarc-1-4-0-Beta1.tar.gz) = 1247386 bytes | |
7 | SHA1 (patch-build-config.h.in) = 14723ab0a578978117be7dcc1d60fe5af955b610 | 7 | SHA1 (patch-configure.ac) = d174911e4de37d3b50b525469cbe410bb7ae119f | |
8 | SHA1 (patch-configure) = 1af3b346ac6db51d1701af8ba4e123e0e6a6b973 | 8 | SHA1 (patch-libopendmarc_opendmarc__dns.c) = e76ca13707677525b72609b4a5268d77efcfba84 | |
9 | SHA1 (patch-configure.ac) = bfd2c16d22e25b564d33220b5e7ceadedc5ee016 | 9 | SHA1 (patch-libopendmarc_opendmarc__spf__dns.c) = b6e1311be8e9ef44c333be57fef474f6b080a199 | |
10 | SHA1 (patch-libopendmarc_opendmarc__dns.c) = 7c75d464bcdba6baf963cb002e7ba94a60593ecc | |||
11 | SHA1 (patch-libopendmarc_opendmarc__spf__dns.c) = 82f22fd2e224ddef1cd3c6788518e629fdea125f |
@@ -1,24 +1,29 @@ | @@ -1,24 +1,29 @@ | |||
1 | $NetBSD: patch-configure.ac,v 1.2 2020/07/27 20:41:10 oster Exp $ | 1 | $NetBSD: patch-configure.ac,v 1.3 2020/12/24 01:10:23 manu Exp $ | |
2 | 2 | |||
3 | Add appropriate flags if res_ndestroy(), __res_ninit(), or | 3 | Search for res_ndestroy and use it instead of res_nclose if available | |
4 | __res_ndestroy() are found. | |||
5 | 4 | |||
6 | --- configure.ac.orig 2015-02-23 20:31:50.000000000 +0000 | 5 | --- configure.ac.orig 2020-09-22 02:55:01.853002338 +0200 | |
7 | +++ configure.ac | 6 | +++ configure.ac 2020-09-22 02:55:47.922944675 +0200 | |
8 | @@ -126,6 +126,16 @@ AC_CHECK_LIB(resolv, inet_aton, , , [-ln | 7 | @@ -138,8 +138,22 @@ | |
8 | [return res_ninit(NULL);])]) | |||
9 | AC_SEARCH_LIBS(res_ninit, resolv, | 9 | AC_SEARCH_LIBS(res_ninit, resolv, | |
10 | AC_DEFINE(HAVE_RES_NINIT, 1, | 10 | AC_DEFINE(HAVE_RES_NINIT, 1, | |
11 | [Define to 1 if you have the `res_ninit()' function.])) | 11 | [Define to 1 if you have the `res_ninit()' function.])) | |
12 | +AC_SEARCH_LIBS(res_ndestroy, resolv, | 12 | +AC_MSG_CHECKING([if res_ndestroy is available]) | |
13 | + AC_DEFINE(HAVE_RES_NDESTROY, 1, | 13 | +AC_LINK_IFELSE([AC_LANG_PROGRAM([ | |
14 | + [Define to 1 if you have the `res_ndestroy()' function.])) | 14 | + #include <sys/types.h> | |
15 | +AC_SEARCH_LIBS(__res_ninit, resolv, | 15 | + #include <netinet/in.h> | |
16 | + AC_DEFINE(HAVE_RES_NINIT, 1, | 16 | + #include <arpa/nameser.h> | |
17 | + [Define to 1 if you have the `__res_ninit()' function.])) | 17 | + #include <resolv.h> | |
18 | +AC_SEARCH_LIBS(__res_ndestroy, resolv, | 18 | + ],[ | |
19 | + AC_DEFINE(HAVE_RES_NDESTROY, 1, | 19 | + struct __res_state res; | |
20 | + [Define to 1 if you have the `__res_ndestroy()' function.])) | 20 | + res_ndestroy(&res); | |
21 | + ])], [AC_DEFINE([HAVE_RES_NDESTROY], [1], | |||
22 | + [we have res_ndestroy]) res_ndestroy=yes], | |||
23 | + [res_ndestroy=no]) | |||
24 | +AC_MSG_RESULT([$res_ndestroy]) | |||
21 | + | 25 | + | |
26 | m4_rename_force([saved_AC_LANG_CALL], [AC_LANG_CALL]) | |||
22 | AC_CHECK_LIB(idn, idn_free) | 27 | AC_CHECK_LIB(idn, idn_free) | |
23 | AC_CHECK_LIB(rt, nanosleep) | 28 | AC_CHECK_LIB(rt, nanosleep) | |
24 | AC_SEARCH_LIBS(inet_addr, nsl) | 29 | AC_SEARCH_LIBS(inet_addr, nsl) |
@@ -1,18 +1,29 @@ | @@ -1,18 +1,29 @@ | |||
1 | $NetBSD: patch-libopendmarc_opendmarc__dns.c,v 1.1 2020/07/27 20:41:10 oster Exp $ | 1 | $NetBSD: patch-libopendmarc_opendmarc__dns.c,v 1.2 2020/12/24 01:10:23 manu Exp $ | |
2 | 2 | |||
3 | Patch from Roy Marples: if we have res_ndestroy(), use that in place of just res_nclose(). | 3 | Make sure res_init works on zeroed structure | |
4 | Search for res_ndestroy and use it instead of res_nclose if available | |||
4 | 5 | |||
5 | --- libopendmarc/opendmarc_dns.c.orig 2015-02-23 20:31:51.000000000 +0000 | 6 | --- libopendmarc/opendmarc_dns.c.orig 2018-11-15 01:58:31.000000000 +0100 | |
6 | +++ libopendmarc/opendmarc_dns.c | 7 | +++ libopendmarc/opendmarc_dns.c 2020-12-23 15:57:30.488718786 +0100 | |
7 | @@ -211,7 +211,11 @@ dmarc_dns_get_record(char *domain, int * | 8 | @@ -201,16 +201,21 @@ | |
9 | while (*bp == '.') | |||
10 | ++bp; | |||
11 | ||||
12 | #ifdef HAVE_RES_NINIT | |||
13 | + memset(&resp, 0, sizeof(resp)); | |||
14 | res_ninit(&resp); | |||
15 | #ifdef RES_USE_DNSSEC | |||
16 | resp.options |= RES_USE_DNSSEC; | |||
17 | #endif | |||
8 | (void) opendmarc_policy_library_dns_hook(&resp.nscount, | 18 | (void) opendmarc_policy_library_dns_hook(&resp.nscount, | |
9 | &resp.nsaddr_list); | 19 | &resp.nsaddr_list); | |
10 | answer_len = res_nquery(&resp, bp, C_IN, T_TXT, answer_buf, sizeof answer_buf); | 20 | answer_len = res_nquery(&resp, bp, C_IN, T_TXT, answer_buf, sizeof answer_buf); | |
11 | +#ifdef HAVE_RES_NDESTROY | 21 | +#ifdef HAVE_RES_NDESTROY | |
12 | + res_ndestroy(&resp); | 22 | + res_ndestroy(&resp); | |
13 | +#else | 23 | +#else /* HAVE_RES_NDESTROY */ | |
14 | res_nclose(&resp); | 24 | res_nclose(&resp); | |
15 | +#endif | 25 | +#endif /* HAVE_RES_NDESTROY */ | |
16 | #else /* HAVE_RES_NINIT */ | 26 | #else /* HAVE_RES_NINIT */ | |
17 | #if defined RES_USE_DNSSEC | 27 | res_init(); | |
28 | #ifdef RES_USE_DNSSEC | |||
18 | _res.options |= RES_USE_DNSSEC; | 29 | _res.options |= RES_USE_DNSSEC; |
@@ -1,76 +1,82 @@ | @@ -1,76 +1,82 @@ | |||
1 | $NetBSD: patch-libopendmarc_opendmarc__spf__dns.c,v 1.1 2020/07/27 20:41:10 oster Exp $ | 1 | --- libopendmarc/opendmarc_spf_dns.c.orig 2020-09-22 03:01:49.272695446 +0200 | |
2 | 2 | +++ libopendmarc/opendmarc_spf_dns.c 2020-09-22 03:05:01.660275230 +0200 | ||
3 | Patch from Roy Marples: if we have res_ndestroy(), use that in place of just res_nclose(). | 3 | @@ -107,9 +107,13 @@ | |
4 | 4 | ++bp; | ||
5 | --- libopendmarc/opendmarc_spf_dns.c.orig 2015-02-23 20:31:51.000000000 +0000 | |||
6 | +++ libopendmarc/opendmarc_spf_dns.c | |||
7 | @@ -108,7 +108,11 @@ opendmarc_spf_dns_lookup_a_actual(char * | |||
8 | 5 | |||
9 | #ifdef HAVE_RES_NINIT | 6 | #ifdef HAVE_RES_NINIT | |
10 | k = res_nquery(&resp, bp, C_IN, sought, a_buf, sizeof a_buf); | 7 | k = res_nquery(&resp, bp, C_IN, sought, a_buf, sizeof a_buf); | |
11 | +#ifdef HAVE_RES_NDESTROY | 8 | +#ifdef HAVE_RES_NDESTROY | |
12 | + res_ndestroy(&resp); | 9 | + res_ndestroy(&resp); | |
13 | +#else | 10 | +#else /* HAVE_RES_NDESTROY */ | |
14 | res_nclose(&resp); | 11 | res_nclose(&resp); | |
15 | +#endif | 12 | +#endif /* HAVE_RES_NDESTROY */ | |
16 | #else /* HAVE_RES_NINIT */ | 13 | #else /* HAVE_RES_NINIT */ | |
17 | k = res_query(bp, C_IN, sought, a_buf, sizeof a_buf); | 14 | k = res_query(bp, C_IN, sought, a_buf, sizeof a_buf); | |
18 | #endif /* HAVE_RES_NINIT */ | 15 | #endif /* HAVE_RES_NINIT */ | |
19 | @@ -253,7 +257,11 @@ opendmarc_spf_dns_lookup_mx(char *domain | 16 | if (k < 0) | |
17 | @@ -252,9 +256,13 @@ | |||
18 | #ifdef HAVE_RES_NINIT | |||
20 | memset(&resp, '\0', sizeof resp); | 19 | memset(&resp, '\0', sizeof resp); | |
21 | res_ninit(&resp); | 20 | res_ninit(&resp); | |
22 | k = res_nquery(&resp, domain, C_IN, T_MX, (u_char *) &q, sizeof(q)); | 21 | k = res_nquery(&resp, domain, C_IN, T_MX, (u_char *) &q, sizeof(q)); | |
23 | +#ifdef HAVE_RES_NDESTROY | 22 | +#ifdef HAVE_RES_NDESTROY | |
24 | + res_ndestroy(&resp); | 23 | + res_ndestroy(&resp); | |
25 | +#else | 24 | +#else /* HAVE_RES_NDESTROY */ | |
26 | res_nclose(&resp); | 25 | res_nclose(&resp); | |
27 | +#endif | 26 | +#endif /* HAVE_RES_NDESTROY */ | |
28 | #else /* HAVE_RES_NINIT */ | 27 | #else /* HAVE_RES_NINIT */ | |
29 | k = res_query(domain, C_IN, T_MX, (u_char *) &q, sizeof(q)); | 28 | k = res_query(domain, C_IN, T_MX, (u_char *) &q, sizeof(q)); | |
30 | #endif /* HAVE_RES_NINIT */ | 29 | #endif /* HAVE_RES_NINIT */ | |
31 | @@ -366,7 +374,11 @@ opendmarc_spf_dns_lookup_ptr(char *ip, c | 30 | ||
31 | @@ -365,9 +373,13 @@ | |||
32 | #ifdef HAVE_RES_NINIT | |||
32 | memset(&resp, '\0', sizeof resp); | 33 | memset(&resp, '\0', sizeof resp); | |
33 | res_ninit(&resp); | 34 | res_ninit(&resp); | |
34 | k = res_nquery(&resp, (char *)buf, C_IN, T_PTR, (u_char *) &q, sizeof(q)); | 35 | k = res_nquery(&resp, (char *)buf, C_IN, T_PTR, (u_char *) &q, sizeof(q)); | |
35 | +#ifdef HAVE_RES_NDESTROY | 36 | +#ifdef HAVE_RES_NDESTROY | |
36 | + res_ndestroy(&resp); | 37 | + res_ndestroy(&resp); | |
37 | +#else | 38 | +#else /* HAVE_RES_NDESTROY */ | |
38 | res_nclose(&resp); | 39 | res_nclose(&resp); | |
39 | +#endif | 40 | +#endif /* HAVE_RES_NDESTROY */ | |
40 | #else /* HAVE_RES_NINIT */ | 41 | #else /* HAVE_RES_NINIT */ | |
41 | k = res_query((char *)buf, C_IN, T_PTR, (u_char *) &q, sizeof(q)); | 42 | k = res_query((char *)buf, C_IN, T_PTR, (u_char *) &q, sizeof(q)); | |
42 | #endif /* HAVE_RES_NINIT */ | 43 | #endif /* HAVE_RES_NINIT */ | |
43 | @@ -461,7 +473,11 @@ opendmarc_spf_dns_does_domain_exist(char | 44 | ||
45 | @@ -460,9 +472,13 @@ | |||
46 | #ifdef T_AAAA | |||
44 | (void) res_nquery(&resp, domain, C_IN, T_AAAA, aaaa_q, sizeof aaaa_q); | 47 | (void) res_nquery(&resp, domain, C_IN, T_AAAA, aaaa_q, sizeof aaaa_q); | |
45 | #endif /* T_AAAA */ | 48 | #endif /* T_AAAA */ | |
46 | (void) res_nquery(&resp, domain, C_IN, T_MX, mx_q, sizeof mx_q); | 49 | (void) res_nquery(&resp, domain, C_IN, T_MX, mx_q, sizeof mx_q); | |
47 | +#ifdef HAVE_RES_NDESTROY | 50 | +#ifdef HAVE_RES_NDESTROY | |
48 | + res_ndestroy(&resp); | 51 | + res_ndestroy(&resp); | |
49 | +#else | 52 | +#else /* HAVE_RES_NDESTROY */ | |
50 | res_nclose(&resp); | 53 | res_nclose(&resp); | |
51 | +#endif | 54 | +#endif /* HAVE_RES_NDESTROY */ | |
52 | #else /* HAVE_RES_NINIT */ | 55 | #else /* HAVE_RES_NINIT */ | |
53 | (void) res_query(domain, C_IN, T_A, a_q, sizeof a_q); | 56 | (void) res_query(domain, C_IN, T_A, a_q, sizeof a_q); | |
54 | #ifdef T_AAAA | 57 | #ifdef T_AAAA | |
55 | @@ -603,13 +619,21 @@ opendmarc_spf_dns_get_record(char *domai | 58 | (void) res_query(domain, C_IN, T_AAAA, aaaa_q, sizeof aaaa_q); | |
59 | @@ -602,15 +618,23 @@ | |||
60 | goto got_spf_record; | |||
56 | } | 61 | } | |
57 | *rp = h_errno; | 62 | *rp = h_errno; | |
58 | #ifdef HAVE_RES_NINIT | 63 | #ifdef HAVE_RES_NINIT | |
59 | +#ifdef HAVE_RES_NDESTROY | 64 | +#ifdef HAVE_RES_NDESTROY | |
60 | + res_ndestroy(&resp); | 65 | + res_ndestroy(&resp); | |
61 | +#else | 66 | +#else /* HAVE_RES_NDESTROY */ | |
62 | res_nclose(&resp); | 67 | res_nclose(&resp); | |
63 | +#endif | 68 | +#endif /* HAVE_RES_NDESTROY */ | |
64 | #endif /* HAVE_RES_NINIT */ | 69 | #endif /* HAVE_RES_NINIT */ | |
65 | return NULL; | 70 | return NULL; | |
66 | } | 71 | } | |
67 | got_spf_record: | 72 | got_spf_record: | |
68 | #ifdef HAVE_RES_NINIT | 73 | #ifdef HAVE_RES_NINIT | |
69 | +#ifdef HAVE_RES_NDESTROY | 74 | +#ifdef HAVE_RES_NDESTROY | |
70 | + res_ndestroy(&resp); | 75 | + res_ndestroy(&resp); | |
71 | +#else | 76 | +#else /* HAVE_RES_NDESTROY */ | |
72 | res_nclose(&resp); | 77 | res_nclose(&resp); | |
73 | +#endif | 78 | +#endif /* HAVE_RES_NDESTROY */ | |
74 | #endif /* HAVE_RES_NINIT */ | 79 | #endif /* HAVE_RES_NINIT */ | |
75 | 80 | |||
76 | if (k > (int)(sizeof txt_buf)) | 81 | if (k > (int)(sizeof txt_buf)) | |
82 | k = sizeof txt_buf; |