summaryrefslogtreecommitdiff
path: root/net/powerdns-recursor/patches/patch-rec-carbon.cc
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2020-06-25 18:21:29 +0000
committerbsiegert <bsiegert@pkgsrc.org>2020-06-25 18:21:29 +0000
commit69e6725b36bfdae5b2e5691e645116a525e37642 (patch)
tree3f36e59978754f05225ba41577a0aebb52ea3b14 /net/powerdns-recursor/patches/patch-rec-carbon.cc
parent08299243dcd1a9bbb75ef45f9c3c768ccdd325c7 (diff)
downloadpkgsrc-69e6725b36bfdae5b2e5691e645116a525e37642.tar.gz
Pullup ticket #6248 - requested by otis
net/powerdns-recursor: security fix Revisions pulled up: - net/powerdns-recursor/Makefile 1.36 - net/powerdns-recursor/distinfo 1.32 - net/powerdns-recursor/patches/patch-iputils.hh deleted - net/powerdns-recursor/patches/patch-misc.cc 1.1 - net/powerdns-recursor/patches/patch-misc.hh 1.1 - net/powerdns-recursor/patches/patch-pdns__recursor.cc 1.6 - net/powerdns-recursor/patches/patch-rec-carbon.cc 1.1 - net/powerdns-recursor/patches/patch-rec__control.cc 1.1 - net/powerdns-recursor/patches/patch-webserver.cc 1.1 - net/powerdns-recursor/patches/patch-ws-recursor.cc 1.1 --- Module Name: pkgsrc Committed By: otis Date: Wed Jun 17 22:55:11 UTC 2020 Modified Files: pkgsrc/net/powerdns-recursor: Makefile distinfo Added Files: pkgsrc/net/powerdns-recursor/patches: patch-misc.cc patch-misc.hh patch-pdns__recursor.cc patch-rec-carbon.cc patch-rec__control.cc patch-webserver.cc patch-ws-recursor.cc Removed Files: pkgsrc/net/powerdns-recursor/patches: patch-iputils.hh Log Message: net/powerdns-recursor: Update to 4.3.1 Changelog since 4.3.0: * Released: - 19th of May 2020 * Improvements: - Add ubuntu focal target. * Bug Fixes: - Backport of security fixes for: - CVE-2020-10995 - CVE-2020-12244 - CVE-2020-10030 - avoid a crash when loading an invalid RPZ. - RPZ dumpFile/seedFile: store/get SOA refresh on dump/load. * misc: - Update boost.m4.
Diffstat (limited to 'net/powerdns-recursor/patches/patch-rec-carbon.cc')
-rw-r--r--net/powerdns-recursor/patches/patch-rec-carbon.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/net/powerdns-recursor/patches/patch-rec-carbon.cc b/net/powerdns-recursor/patches/patch-rec-carbon.cc
new file mode 100644
index 00000000000..42628a0d984
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-rec-carbon.cc
@@ -0,0 +1,31 @@
+$NetBSD: patch-rec-carbon.cc,v 1.1.2.2 2020/06/25 18:21:29 bsiegert Exp $
+
+backport changes based on PR #9127 from
+https://github.com/PowerDNS/pdns/pull/9127
+
+--- rec-carbon.cc.orig 2020-06-17 21:27:18.582569489 +0000
++++ rec-carbon.cc
+@@ -32,17 +32,13 @@ try
+ if(namespace_name.empty()) {
+ namespace_name="pdns";
+ }
+- if(hostname.empty()) {
+- char tmp[HOST_NAME_MAX+1];
+- memset(tmp, 0, sizeof(tmp));
+- if (gethostname(tmp, sizeof(tmp)) != 0) {
+- throw std::runtime_error("The 'carbon-ourname' setting has not been set and we are unable to determine the system's hostname: " + stringerror());
++ if (hostname.empty()) {
++ try {
++ hostname = getCarbonHostName();
++ }
++ catch(const std::exception& e) {
++ throw std::runtime_error(std::string("The 'carbon-ourname' setting has not been set and we are unable to determine the system's hostname: ") + e.what());
+ }
+- char *p = strchr(tmp, '.');
+- if(p) *p=0;
+-
+- hostname=tmp;
+- boost::replace_all(hostname, ".", "_");
+ }
+ if(instance_name.empty()) {
+ instance_name="recursor";