]> granicus.if.org Git - pdns/commitdiff
pdns_control notify: make sure PDNS is either master, or slave with renotify
authorKlaus Darilion <klaus.darilion@nic.at>
Tue, 24 May 2016 13:23:56 +0000 (13:23 +0000)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 20 Aug 2018 10:40:10 +0000 (12:40 +0200)
(cherry picked from commit e64b1e21a4090316c06ef9b7112092db6bb4feff)
(cherry picked from commit 0c54189148e31230768b67f2338991e94927d49d)

pdns/dynhandler.cc

index 3d681cd2a09da2846d2116af874a2cc49f8b8c45..0f476791d28a035bb07fc8de157ed35f4981c7e7 100644 (file)
@@ -261,7 +261,7 @@ string DLNotifyHostHandler(const vector<string>&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<string>&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";
   L<<Logger::Warning<<"Notification request for domain '"<<parts[1]<<"' received from operator"<<endl;