]> 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)
committerChris Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Tue, 29 May 2018 12:32:17 +0000 (14:32 +0200)
(cherry picked from commit e64b1e21a4090316c06ef9b7112092db6bb4feff)

pdns/dynhandler.cc

index e71649ea6829e5a46d5b9d73fbc7675ba8a6e6b8..b03b0a36054675c2ab08f62afec3ad572f76b282 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";
   g_log<<Logger::Warning<<"Notification request for domain '"<<parts[1]<<"' received from operator"<<endl;