From: Klaus Darilion Date: Tue, 24 May 2016 13:23:56 +0000 (+0000) Subject: pdns_control notify: make sure PDNS is either master, or slave with renotify X-Git-Tag: dnsdist-1.3.1~49^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c54189148e31230768b67f2338991e94927d49d;p=thirdparty%2Fpdns.git pdns_control notify: make sure PDNS is either master, or slave with renotify (cherry picked from commit e64b1e21a4090316c06ef9b7112092db6bb4feff) --- diff --git a/pdns/dynhandler.cc b/pdns/dynhandler.cc index e71649ea68..b03b0a3605 100644 --- a/pdns/dynhandler.cc +++ b/pdns/dynhandler.cc @@ -261,7 +261,7 @@ string DLNotifyHostHandler(const vector&parts, Utility::pid_t ppid) ostringstream os; if(parts.size()!=3) return "syntax: notify-host domain ip"; - if(!::arg().mustDo("master") && !::arg().mustDo("slave-renotify")) + if(!::arg().mustDo("master") && !(::arg().mustDo("slave") && ::arg().mustDo("slave-renotify"))) return "PowerDNS not configured as master or slave with re-notifications"; DNSName domain; @@ -289,7 +289,7 @@ string DLNotifyHandler(const vector&parts, Utility::pid_t ppid) UeberBackend B; if(parts.size()!=2) return "syntax: notify domain"; - if(!::arg().mustDo("master") && !::arg().mustDo("slave-renotify")) + if(!::arg().mustDo("master") && !(::arg().mustDo("slave") && ::arg().mustDo("slave-renotify"))) return "PowerDNS not configured as master or slave with re-notifications"; g_log<