]> granicus.if.org Git - pdns/commitdiff
dnsdist: Display the ACL content on startup
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 22 Mar 2016 09:16:35 +0000 (10:16 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 22 Mar 2016 09:16:35 +0000 (10:16 +0100)
Closes #3588.

pdns/dnsdist.cc

index 98f45eb3df0060bb151d00eb77cf2b8ad183db2a..7d447262fb62e6bef8fd2448124fa494d3946e0e 100644 (file)
@@ -1596,6 +1596,15 @@ try
   else {
     vinfolog("Running in the foreground");
     warnlog("dnsdist %s comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2", VERSION);
+    vector<string> vec;
+    std::string acls;
+    g_ACL.getCopy().toStringVector(&vec);
+    for(const auto& s : vec) {
+      if (!acls.empty())
+        acls += ", ";
+      acls += s;
+    }
+    infolog("ACL allowing queries from: %s", acls.c_str());
   }
 
   /* this need to be done _after_ dropping privileges */