]> granicus.if.org Git - pdns/commitdiff
bindbackend: refuse launch suffixes
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 1 May 2018 17:38:31 +0000 (19:38 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 1 May 2018 17:38:31 +0000 (19:38 +0200)
modules/bindbackend/bindbackend2.cc

index 3a1971fd2504793001fbe792dbceafdc94ed2ce2..e1e12ec19004e4e3f5c880df722db9246b5e08c0 100644 (file)
@@ -1357,13 +1357,21 @@ class Bind2Factory : public BackendFactory
 
       DNSBackend *make(const string &suffix="")
       {
+         assertEmptySuffix(suffix);
          return new Bind2Backend(suffix);
       }
       
       DNSBackend *makeMetadataOnly(const string &suffix="")
       {
+        assertEmptySuffix(suffix);
         return new Bind2Backend(suffix, false);
       }
+   private:
+      void assertEmptySuffix(const string &suffix)
+      {
+        if(suffix.length())
+          throw PDNSException("launch= suffixes are not supported on the bindbackend");
+      }
 };
 
 //! Magic class that is activated when the dynamic library is loaded