]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Help, man page and a few tweaks
authorOtto <otto.moerbeek@open-xchange.com>
Wed, 15 Dec 2021 10:49:13 +0000 (11:49 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Wed, 15 Dec 2021 10:49:13 +0000 (11:49 +0100)
docs/manpages/pdnsutil.1.rst
pdns/pdnsutil.cc

index ca086d6112bcc9942bb832fe8790df26089b2b41..42a233274323c90c38338489ecddd64b82ab7d31 100644 (file)
@@ -251,6 +251,8 @@ unset-presigned *ZONE*
     Disables presigned operation for *ZONE*.
 raw-lua-from-content *TYPE* *CONTENT*  
     Display record contents in a form suitable for dnsdist's `SpoofRawAction`.
+zonemd-verify-file *ZONE* *FILE*  
+    Validate ZONEMD for *ZONE* read from *FILE*.
 
 DEBUGGING TOOLS
 ---------------
index b929b375fe316e349e646df08796278655596424..48f767a0454802fd2cef76ea7ba8a6390dcdbb59 100644 (file)
@@ -1375,14 +1375,15 @@ static int zonemdVerifyFile(const DNSName& zone, const string& fname) {
   }
   catch (const std::exception& ex) {
     cerr << "zonemd-verify-file: " << ex.what() << endl;
+    return EXIT_FAILURE;
   }
 
   if (validationDone) {
     if (validationOK) {
-      cout << "zonemd-verify-file: Validation of ZONEMD record succeeded" << endl;
+      cout << "zonemd-verify-file: Verification of ZONEMD record succeeded" << endl;
       return EXIT_SUCCESS;
     } else {
-      cerr << "zonemd-verify-file: Validation of ZONEMD record(s) failed" << endl;
+      cerr << "zonemd-verify-file: Verification of ZONEMD record(s) failed" << endl;
     }
   }
   else {
@@ -2445,6 +2446,7 @@ try
     cout<<"unset-publish-cds ZONE             Disable sending CDS responses for ZONE"<<endl;
     cout<<"test-schema ZONE                   Test DB schema - will create ZONE"<<endl;
     cout<<"raw-lua-from-content TYPE CONTENT  Display record contents in a form suitable for dnsdist's `SpoofRawAction`"<<endl;
+    cout<<"zonemd-verify-file ZONE FILE       Validate ZONEMD for ZONE"<<endl;
     cout<<desc<<endl;
     return 0;
   }
@@ -2571,14 +2573,13 @@ try
   if(cmds[0] == "zonemd-verify-file") {
     if(cmds.size() < 3) {
       cerr<<"Syntax: pdnsutil zonemd-verify-file ZONE FILENAME"<<endl;
-      return 0;
+      return 1;
     }
     if(cmds[1]==".")
       cmds[1].clear();
 
     auto ret = zonemdVerifyFile(DNSName(cmds[1]), cmds[2]);
-    if (ret) exit(ret);
-    return 0;
+    return ret;
   }
 
   DNSSECKeeper dk;