]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: optionally include disabled or empty zones in the pdnsutil list-all-zone and...
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 4 Mar 2021 15:27:53 +0000 (16:27 +0100)
committermind04 <mind04@monshouwer.org>
Wed, 19 May 2021 14:35:38 +0000 (16:35 +0200)
docs/manpages/pdnsutil.1.rst
pdns/pdnsutil.cc

index 27d062e8d6ab58a9a6d72a1a0e2ba7f5793d330c..8b662203608a5eefd964f014ca02538bbc7228cd 100644 (file)
@@ -196,9 +196,11 @@ hash-zone-record *ZONE* *RNAME*
 increase-serial *ZONE*
     Increases the SOA-serial by 1. Uses SOA-EDIT.
 list-keys [*ZONE*]
-    List DNSSEC information for all keys or for *ZONE*.
+    List DNSSEC information for all keys or for *ZONE*. --verbose or -v will
+    also include the keys for disabled or empty zones.
 list-all-zones:
-    List all zone names.
+    List all active zone names. --verbose or -v will also include disabled
+    or empty zones.
 list-zone *ZONE*
     Show all records for *ZONE*.
 load-zone *ZONE* *FILE*
index f557d06237326eb1dc57fa57d0364b939dc0e444..f179882d5f4d218aa85fd3c1edaa5851afeadef6 100644 (file)
@@ -1021,7 +1021,7 @@ static void listKey(DomainInfo const &di, DNSSECKeeper& dk, bool printHeader = t
 static int listKeys(const string &zname, DNSSECKeeper& dk){
   UeberBackend B("default");
 
-  if (zname != "all") {
+  if (!zname.empty()) {
     DomainInfo di;
     if(!B.getDomainInfo(DNSName(zname), di)) {
       cerr << "Zone "<<zname<<" not found."<<endl;
@@ -1030,7 +1030,7 @@ static int listKeys(const string &zname, DNSSECKeeper& dk){
     listKey(di, dk);
   } else {
     vector<DomainInfo> domainInfo;
-    B.getAllDomains(&domainInfo);
+    B.getAllDomains(&domainInfo, g_verbose);
     bool printHeader = true;
     for (const auto& di : domainInfo) {
       listKey(di, dk, printHeader);
@@ -1618,7 +1618,7 @@ static int listAllZones(const string &type="") {
   UeberBackend B("default");
 
   vector<DomainInfo> domains;
-  B.getAllDomains(&domains, true);
+  B.getAllDomains(&domains, g_verbose);
 
   int count = 0;
   for (const auto& di: domains) {
@@ -2840,7 +2840,10 @@ try
       cerr<<"Syntax: pdnsutil list-keys [ZONE]"<<endl;
       return 0;
     }
-    string zname = (cmds.size() == 2) ? cmds[1] : "all";
+    string zname;
+    if (cmds.size() == 2) {
+      zname = cmds.at(1);
+    }
     return listKeys(zname, dk);
   }
   else if(cmds[0] == "load-zone") {