]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
keymgr: deprecate local-serial command
authorDaniel Salzman <daniel.salzman@nic.cz>
Mon, 13 Oct 2025 06:15:50 +0000 (08:15 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Wed, 15 Oct 2025 10:24:33 +0000 (12:24 +0200)
doc/man_keymgr.rst
src/utils/keymgr/main.c

index 3afba90362a78fb0a9e15f085d38c9615df9c030..a46fcbda6e2f8cc6468aff03342033cda8265eb7 100644 (file)
@@ -116,12 +116,6 @@ Commands
   Prints the current NSEC3 salt used for signing. If *new_salt* is specified, the salt is overwritten.
   The salt is printed and expected in hexadecimal, or dash if empty.
 
-**local-serial** [*new_serial*]
-  Print SOA serial stored in KASP database when using on-secondary DNSSEC signing.
-  If *new_serial* is specified, the serial is overwritten. After updating the serial, expire the zone
-  (**zone-purge +expire +zonefile +journal**) if the server is running, or remove corresponding zone file
-  and journal contents if the server is stopped.
-
 **master-serial** [*new_serial*]
   Print SOA serial of the remote master stored in KASP database when using on-secondary DNSSEC signing.
   If *new_serial* is specified, the serial is overwritten (not recommended).
index 51d70579621e2bd6a38c681dc46b7d769533a47b..b4d94dca09304cf76fc400387c7ab1e95faa2640 100644 (file)
@@ -63,9 +63,6 @@ static void print_help(void)
               "                 (syntax: import-pkcs11 <key_id> <attribute_name>=<value>...)\n"
               "  nsec3-salt    Print current NSEC3 salt. If a parameter is specified, set new salt.\n"
               "                 (syntax: nsec3-salt [<new_salt>])\n"
-              "  local-serial  Print SOA serial stored in KASP database when using on-slave signing.\n"
-              "                 If a parameter is specified, set new serial.\n"
-              "                 (syntax: local-serial <new_serial>)\n"
               "  master-serial Print SOA serial of the remote master stored in KASP database when using on-slave signing.\n"
               "                 If a parameter is specified, set new master serial.\n"
               "                 (syntax: master-serial <new_serial>)\n"
@@ -184,8 +181,8 @@ static int key_command(int argc, char *argv[], int opt_ind, knot_lmdb_db_t *kasp
                        ret = keymgr_nsec3_salt_print(&kctx);
                        print_ok_on_succes = false;
                }
-       } else if (same_command(argv[1], "local-serial", false) || same_command(argv[1], "master-serial", false)) {
-               kaspdb_serial_t type = (argv[1][0] == 'm' ? KASPDB_SERIAL_MASTER : KASPDB_SERIAL_LASTSIGNED);
+       } else if (same_command(argv[1], "master-serial", false)) {
+               kaspdb_serial_t type = KASPDB_SERIAL_MASTER;
                if (argc > 2) {
                        uint32_t new_serial = 0;
                        if ((ret = str_to_u32(argv[2], &new_serial)) == KNOT_EOK) {
@@ -195,6 +192,9 @@ static int key_command(int argc, char *argv[], int opt_ind, knot_lmdb_db_t *kasp
                        ret = keymgr_serial_print(&kctx, type);
                        print_ok_on_succes = false;
                }
+       } else if (same_command(argv[1], "local-serial", false)) {
+               WARN2("deprecated command with no effect");
+               print_ok_on_succes = false;
        } else if (same_command(argv[1], "set", false)) {
                CHECK_MISSING_ARG("Key is not specified");
                knot_kasp_key_t *key2set;