]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Mark the lock-file configuration option as deprecated
authorOndřej Surý <ondrej@isc.org>
Thu, 26 Oct 2023 09:08:49 +0000 (11:08 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 26 Oct 2023 20:41:45 +0000 (22:41 +0200)
This is first step in removing the lock-file configuration option, it
marks both the `lock-file` configuration directive and -X option to
named as deprecated.

bin/named/named.rst
bin/named/server.c
doc/arm/reference.rst
doc/misc/options
lib/isccfg/namedconf.c

index 698ffcdfd1606bceba87357cacce2762d61812ec..1c370d8e8d74f5a72708b81a38f3687dd8591635 100644 (file)
@@ -203,6 +203,8 @@ Options
    Use of this option overrides the ``lock-file`` option in
    :iscman:`named.conf`. If set to ``none``, the lock file check is disabled.
 
+   This option has been deprecated and will be removed in the next release.
+
 Signals
 ~~~~~~~
 
index 15bcfa7ffa29b5af4104f1f3b196ec7ee2460c79..24b77fa59e7882d9c421d97db04bec8f093c10a5 100644 (file)
@@ -8171,6 +8171,11 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "'lock-file' has no effect "
                                      "because the server was run with -X");
+                       isc_log_write(
+                               named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                               NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+                               "-X option has been deprecated and will be "
+                               "removed in the a release");
                        if (named_g_defaultlockfile != NULL) {
                                server->lockfile = isc_mem_strdup(
                                        server->mctx, named_g_defaultlockfile);
@@ -8185,6 +8190,10 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config,
                                                          filename);
                }
        } else if (named_g_forcelock && named_g_defaultlockfile != NULL) {
+               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+                             "-X option has been deprecated and will be "
+                             "removed in the a release");
                server->lockfile = isc_mem_strdup(server->mctx,
                                                  named_g_defaultlockfile);
        }
index 0ca6ac11642f35bf338ef9fe1956568b8cd99cff..74645a46381a84e50ce14712a52caaf0337b5e2a 100644 (file)
@@ -1477,9 +1477,11 @@ default is used.
    on exit. If not specified, the default is ``named.memstats``.
 
 .. namedconf:statement:: lock-file
-   :tags: server
+   :tags: deprecated
    :short: Sets the pathname of the file on which :iscman:`named` attempts to acquire a file lock when starting for the first time.
 
+   This option is deprecated and will be removed in a future release.
+
    This is the pathname of a file on which :iscman:`named` attempts to acquire a
    file lock when starting for the first time; if unsuccessful, the
    server terminates, under the assumption that another server
index 18a51d86094433aa95b5b27107ed6ef2bee9bef9..27290c25b2f615ed7ba5b26efe4301f178f6bed1 100644 (file)
@@ -164,7 +164,7 @@ options {
        listen-on [ port <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
        listen-on-v6 [ port <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
        lmdb-mapsize <sizeval>;
-       lock-file ( <quoted_string> | none );
+       lock-file ( <quoted_string> | none ); // deprecated
        managed-keys-directory <quoted_string>;
        masterfile-format ( raw | text );
        masterfile-style ( full | relative );
index 348be0f592e4d1204e8fbcd7277d2732a27008f9..4eb9b47e2e68acff9a31b01365374651589b1984 100644 (file)
@@ -1269,7 +1269,7 @@ static cfg_clausedef_t options_clauses[] = {
          CFG_CLAUSEFLAG_OBSOLETE },
        { "listen-on", &cfg_type_listenon, CFG_CLAUSEFLAG_MULTI },
        { "listen-on-v6", &cfg_type_listenon, CFG_CLAUSEFLAG_MULTI },
-       { "lock-file", &cfg_type_qstringornone, 0 },
+       { "lock-file", &cfg_type_qstringornone, CFG_CLAUSEFLAG_DEPRECATED },
        { "managed-keys-directory", &cfg_type_qstring, 0 },
        { "match-mapped-addresses", &cfg_type_boolean, 0 },
        { "max-rsa-exponent-size", &cfg_type_uint32, 0 },