]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Deprecate setting operating system limits from named.conf
authorOndřej Surý <ondrej@isc.org>
Sun, 13 Nov 2022 09:12:52 +0000 (10:12 +0100)
committerOndřej Surý <ondrej@isc.org>
Mon, 14 Nov 2022 15:48:52 +0000 (16:48 +0100)
It was possible to set operating system limits (RLIMIT_DATA,
RLIMIT_STACK, RLIMIT_CORE and RLIMIT_NOFILE) from named.conf.  It's
better to leave these untouched as setting these is responsibility of
the operating system and/or supervisor.

Deprecate the configuration options and remove them in future BIND 9
release.

bin/tests/system/checkconf/good.conf.in
doc/arm/reference.rst
doc/man/named.conf.5in
doc/misc/options
lib/isccfg/namedconf.c

index 9ed4ece922d34052d2792a3848eda3e295ef5d0a..46b15a85596edb358a374e5d0cb2fd1939972f41 100644 (file)
@@ -45,12 +45,9 @@ options {
        blackhole {
                10.0.0.0/8;
        };
-       coresize 1073741824;
-       datasize 104857600;
        directory ".";
        dscp 41;
        dump-file "named_dumpdb";
-       files 1000;
        heartbeat-interval 30;
        hostname none;
        interface-interval 30;
index 38396f03a5846180080810e0934a01bde97bca68..4459e78f2e95b56aeb3e57e44d80a95be5ddfb61 100644 (file)
@@ -3645,19 +3645,19 @@ gigabyte. ``unlimited`` requests unlimited use, or the maximum available
 amount. ``default`` uses the limit that was in force when the server was
 started. See the description of :term:`size`.
 
-The following options set operating system resource limits for the name
-server process. Some operating systems do not support some or any of the
-limits; on such systems, a warning is issued if an unsupported
-limit is used.
+The following options are deprecated in favor of setting the operating system
+resource limits from the operating system and/or process supervisor, should not
+be used, and will be rendered non-operational in a future release.
+
 
 .. namedconf:statement:: coresize
-   :tags: server
+   :tags: deprecated
    :short: Sets the maximum size of a core dump.
 
    This sets the maximum size of a core dump. The default is ``default``.
 
 .. namedconf:statement:: datasize
-   :tags: server
+   :tags: deprecated
    :short: Sets the maximum amount of data memory that can be used by the server.
 
    This sets the maximum amount of data memory the server may use. The default is
@@ -3672,14 +3672,14 @@ limit is used.
    instead.
 
 .. namedconf:statement:: files
-   :tags: server
+   :tags: deprecated
    :short: Sets the maximum number of files the server may have open concurrently.
 
    This sets the maximum number of files the server may have open concurrently.
    The default is ``unlimited``.
 
 .. namedconf:statement:: stacksize
-   :tags: server
+   :tags: deprecated
    :short: Sets the maximum amount of stack memory that can be used by the server.
 
    This sets the maximum amount of stack memory the server may use. The default is
index 9c7296974825322fb8e6a4d9345247a82b28a79f..6831f2b329b9fb377d557b85788e000aa1f27a74 100644 (file)
@@ -152,8 +152,8 @@ options {
        clients\-per\-query <integer>;
        cookie\-algorithm ( aes | siphash24 );
        cookie\-secret <string>; // may occur multiple times
-       coresize ( default | unlimited | <sizeval> );
-       datasize ( default | unlimited | <sizeval> );
+       coresize ( default | unlimited | <sizeval> ); // deprecated
+       datasize ( default | unlimited | <sizeval> ); // deprecated
        deny\-answer\-addresses { <address_match_element>; ... } [ except\-from { <string>; ... } ];
        deny\-answer\-aliases { <string>; ... } [ except\-from { <string>; ... } ];
        dialup ( notify | notify\-passive | passive | refresh | <boolean> );
@@ -196,7 +196,7 @@ options {
        fetch\-quota\-params <integer> <fixedpoint> <fixedpoint> <fixedpoint>;
        fetches\-per\-server <integer> [ ( drop | fail ) ];
        fetches\-per\-zone <integer> [ ( drop | fail ) ];
-       files ( default | unlimited | <sizeval> );
+       files ( default | unlimited | <sizeval> ); // deprecated
        flush\-zones\-on\-shutdown <boolean>;
        forward ( first | only );
        forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
@@ -331,7 +331,7 @@ options {
        sig\-signing\-type <integer>;
        sig\-validity\-interval <integer> [ <integer> ];
        sortlist { <address_match_element>; ... };
-       stacksize ( default | unlimited | <sizeval> );
+       stacksize ( default | unlimited | <sizeval> ); // deprecated
        stale\-answer\-client\-timeout ( disabled | off | <integer> );
        stale\-answer\-enable <boolean>;
        stale\-answer\-ttl <duration>;
index 8857e4f674991fe48a357e9f4da4edb260f26973..00333ae2cfd07644ecd1a94b22852c1fc7b5e7fd 100644 (file)
@@ -95,8 +95,8 @@ options {
        clients-per-query <integer>;
        cookie-algorithm ( aes | siphash24 );
        cookie-secret <string>; // may occur multiple times
-       coresize ( default | unlimited | <sizeval> );
-       datasize ( default | unlimited | <sizeval> );
+       coresize ( default | unlimited | <sizeval> ); // deprecated
+       datasize ( default | unlimited | <sizeval> ); // deprecated
        deny-answer-addresses { <address_match_element>; ... } [ except-from { <string>; ... } ];
        deny-answer-aliases { <string>; ... } [ except-from { <string>; ... } ];
        dialup ( notify | notify-passive | passive | refresh | <boolean> );
@@ -139,7 +139,7 @@ options {
        fetch-quota-params <integer> <fixedpoint> <fixedpoint> <fixedpoint>;
        fetches-per-server <integer> [ ( drop | fail ) ];
        fetches-per-zone <integer> [ ( drop | fail ) ];
-       files ( default | unlimited | <sizeval> );
+       files ( default | unlimited | <sizeval> ); // deprecated
        flush-zones-on-shutdown <boolean>;
        forward ( first | only );
        forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
@@ -274,7 +274,7 @@ options {
        sig-signing-type <integer>;
        sig-validity-interval <integer> [ <integer> ];
        sortlist { <address_match_element>; ... };
-       stacksize ( default | unlimited | <sizeval> );
+       stacksize ( default | unlimited | <sizeval> ); // deprecated
        stale-answer-client-timeout ( disabled | off | <integer> );
        stale-answer-enable <boolean>;
        stale-answer-ttl <duration>;
index fea1281832fa77da6bf9cd0876146574d2acc57b..63bc80a89f32989dac51f43994900fc5889118f5 100644 (file)
@@ -1218,8 +1218,8 @@ static cfg_clausedef_t options_clauses[] = {
        { "blackhole", &cfg_type_bracketed_aml, 0 },
        { "cookie-algorithm", &cfg_type_cookiealg, 0 },
        { "cookie-secret", &cfg_type_sstring, CFG_CLAUSEFLAG_MULTI },
-       { "coresize", &cfg_type_size, 0 },
-       { "datasize", &cfg_type_size, 0 },
+       { "coresize", &cfg_type_size, CFG_CLAUSEFLAG_DEPRECATED },
+       { "datasize", &cfg_type_size, CFG_CLAUSEFLAG_DEPRECATED },
        { "deallocate-on-exit", NULL, CFG_CLAUSEFLAG_ANCIENT },
        { "directory", &cfg_type_qstring, CFG_CLAUSEFLAG_CALLBACK },
 #ifdef HAVE_DNSTAP
@@ -1236,7 +1236,7 @@ static cfg_clausedef_t options_clauses[] = {
        { "dscp", &cfg_type_uint32, 0 },
        { "dump-file", &cfg_type_qstring, 0 },
        { "fake-iquery", NULL, CFG_CLAUSEFLAG_ANCIENT },
-       { "files", &cfg_type_size, 0 },
+       { "files", &cfg_type_size, CFG_CLAUSEFLAG_DEPRECATED },
        { "flush-zones-on-shutdown", &cfg_type_boolean, 0 },
 #ifdef HAVE_DNSTAP
        { "fstrm-set-buffer-hint", &cfg_type_uint32, 0 },
@@ -1318,7 +1318,7 @@ static cfg_clausedef_t options_clauses[] = {
        { "session-keyfile", &cfg_type_qstringornone, 0 },
        { "session-keyname", &cfg_type_astring, 0 },
        { "sit-secret", NULL, CFG_CLAUSEFLAG_ANCIENT },
-       { "stacksize", &cfg_type_size, 0 },
+       { "stacksize", &cfg_type_size, CFG_CLAUSEFLAG_DEPRECATED },
        { "startup-notify-rate", &cfg_type_uint32, 0 },
        { "statistics-file", &cfg_type_qstring, 0 },
        { "statistics-interval", NULL, CFG_CLAUSEFLAG_ANCIENT },