From 6617c29ec8ec4e00fbfef3a81d250842790e612c Mon Sep 17 00:00:00 2001 From: Mark Schouten Date: Tue, 18 Oct 2016 15:51:36 +0200 Subject: [PATCH] Allow setting the account of a zone via pdnsutil --- pdns/pdnsutil.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index f8fbbb94f5..6a31935db5 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1504,6 +1504,23 @@ bool disableDNSSECOnZone(DNSSECKeeper& dk, const DNSName& zone) return true; } +int setZoneAccount(const DNSName& zone, const string &account) +{ + UeberBackend B("default"); + DomainInfo di; + std::vector meta; + + if (!B.getDomainInfo(zone, di)){ + cerr << "No such zone "<setAccount(zone, account)) { + cerr<<"Could not find backend willing to accept new zone configuration"<()); auto kind=DomainInfo::stringToKind(cmds[2]); exit(setZoneKind(zone, kind)); } + else if(cmds[0]=="set-account") { + if(cmds.size() != 3) { + cerr<<"Syntax: pdnsutil set-account ZONE ACCOUNT"<