]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add verbose option to rndc dnssec -status
authorMatthijs Mekking <matthijs@isc.org>
Wed, 15 Oct 2025 13:52:58 +0000 (15:52 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 28 Nov 2025 14:32:17 +0000 (15:32 +0100)
This can be used to hide noisy details such as key states, and keys that
have been fully retired.

bin/named/server.c
bin/rndc/rndc.rst

index 8994022812bf83690cb9d3081d1de5e54296fcd1..7c370ddb247f1f2aaf76faed5b9551d0bc73d672 100644 (file)
@@ -14169,6 +14169,7 @@ named_server_dnssec(named_server_t *server, isc_lex_t *lex,
        dst_algorithm_t algorithm = 0;
        /* variables for -status */
        bool status = false;
+       bool verbose = false;
        char output[4096];
        isc_stdtime_t now, when;
        isc_time_t timenow, timewhen;
@@ -14208,6 +14209,25 @@ named_server_dnssec(named_server_t *server, isc_lex_t *lex,
                CHECK(DNS_R_SYNTAX);
        }
 
+       if (status) {
+               /* Check for options */
+               for (;;) {
+                       ptr = next_token(lex, text);
+                       if (ptr == NULL) {
+                               msg = "Bad format";
+                               CHECK(ISC_R_UNEXPECTEDEND);
+                       } else if (argcheck(ptr, "v")) {
+                               verbose = true;
+                       } else if (ptr[0] == '-') {
+                               msg = "Unknown option";
+                               CHECK(DNS_R_SYNTAX);
+                       } else {
+                               zonetext = ptr;
+                       }
+                       break;
+               }
+       }
+
        if (rollover || checkds) {
                /* Check for options */
                for (;;) {
index 53804fef57061f37f25550bdcd3fb4c930b6cbac..0a47fba5fee00f0c5b3f8785762b5da03a8e9622 100644 (file)
@@ -180,13 +180,13 @@ Currently supported commands are:
 
    See also :option:`rndc addzone` and :option:`rndc modzone`.
 
-.. option:: dnssec (-status | -step | -rollover -key id [-alg algorithm] [-when time] | -checkds [-key id [-alg algorithm]] [-when time]  published | withdrawn)) zone [class [view]]
+.. option:: dnssec (-status [-v] | -step | -rollover -key id [-alg algorithm] [-when time] | -checkds [-key id [-alg algorithm]] [-when time]  published | withdrawn)) zone [class [view]]
 
    This command allows you to interact with the "dnssec-policy" of a given
    zone.
 
    ``rndc dnssec -status`` show the DNSSEC signing state for the specified
-   zone.
+   zone. Add ``-v`` to show more verbose output on key states.
 
    ``rndc dnssec -step`` sends a signal to an instance of :iscman:`named` for a
    zone configured with ``dnssec-policy`` in manual mode, telling it to