From 0c54189148e31230768b67f2338991e94927d49d Mon Sep 17 00:00:00 2001 From: Klaus Darilion Date: Tue, 24 May 2016 13:23:56 +0000 Subject: [PATCH] pdns_control notify: make sure PDNS is either master, or slave with renotify (cherry picked from commit e64b1e21a4090316c06ef9b7112092db6bb4feff) --- pdns/dynhandler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/dynhandler.cc b/pdns/dynhandler.cc index e71649ea6..b03b0a360 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<