From: Pieter Lexis Date: Wed, 11 Oct 2017 10:26:00 +0000 (+0200) Subject: pdnsutil: Set domain masters to the full list X-Git-Tag: auth-4.1.0-rc2~1^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=305cf6ab9bd4eef96449c65c785699823cc9a2f5;p=thirdparty%2Fpdns.git pdnsutil: Set domain masters to the full list Before, only the last master of all the master would eb added becuase of the way DNSBackend::setMaster() is implemented in gsql backends. --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index db522db8d6..50446ebd64 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -3241,9 +3241,15 @@ try if (!tgt->createDomain(di.zone)) throw PDNSException("Failed to create zone"); tgt->setKind(di.zone, di.kind); tgt->setAccount(di.zone,di.account); + string masters=""; + bool first = true; for(const string& master: di.masters) { - tgt->setMaster(di.zone, master); + if (!first) + masters += ", "; + first = false; + masters += master; } + tgt->setMaster(di.zone, masters); // move records if (!src->list(di.zone, di.id, true)) throw PDNSException("Failed to list records"); nr=0;