]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
remove some long-deprecated arguments from dig
authorEvan Hunt <each@isc.org>
Wed, 1 Nov 2023 16:09:16 +0000 (17:09 +0100)
committerEvan Hunt <each@isc.org>
Thu, 7 Dec 2023 01:32:09 +0000 (17:32 -0800)
certain dig options which were deprecated and became nonoperational
several releases ago still had documentation in the dig man page and
warnings printed when they were used: these included +mapped,
+sigchase, +topdown, +unexpected, +trusted-key, and the -i and -n
options. these are now all fatal errors.

another option was described as deprecated in the man page, but
the code to print a warning was never added. it has been added now.

bin/dig/dig.c
bin/dig/dig.rst
bin/tests/system/idna/tests.sh
bin/tools/mdig.c

index 54d1425ea56db2e1f7624df172c08d36eea82f60..5274a7a9c040d6a7b16f42c88cc80cdd58c0cbb8 100644 (file)
@@ -306,8 +306,7 @@ help(void) {
               "                 +[no]tls-keyfile=file (Load client TLS "
               "private key from file)\n"
               "                 +[no]trace          (Trace delegation down "
-              "from root "
-              "[+dnssec])\n"
+              "from root [implies +dnssec])\n"
               "                 +tries=###          (Set number of UDP "
               "attempts) [3]\n"
               "                 +[no]ttlid          (Control display of ttls "
@@ -1670,6 +1669,8 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
                switch (cmd[1]) {
                case 'e': /* defname */
                        FULLCHECK("defname");
+                       fprintf(stderr, ";; +[no]defname option is "
+                                       "deprecated; use +[no]search\n");
                        if (!lookup->trace) {
                                usesearch = state;
                        }
@@ -2044,12 +2045,11 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
                        goto invalid_option;
                }
                break;
-       case 'm': /* multiline */
+       case 'm':
                switch (cmd[1]) {
                case 'a':
                        FULLCHECK("mapped");
-                       fprintf(stderr, ";; +mapped option is deprecated");
-                       break;
+                       fatal("+mapped option no longer supported");
                case 'u':
                        FULLCHECK("multiline");
                        lookup->multiline = state;
@@ -2303,8 +2303,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
                        break;
                case 'i': /* sigchase */
                        FULLCHECK("sigchase");
-                       fprintf(stderr, ";; +sigchase option is deprecated");
-                       break;
+                       fatal("+sigchase option no longer supported");
                case 'p': /* split */
                        FULLCHECK("split");
                        if (value != NULL && !state) {
@@ -2428,8 +2427,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
                        break;
                case 'o':
                        FULLCHECK("topdown");
-                       fprintf(stderr, ";; +topdown option is deprecated");
-                       break;
+                       fatal("+topdown option no longer supported");
                case 'r':
                        switch (cmd[2]) {
                        case 'a': /* trace */
@@ -2470,9 +2468,8 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
                                break;
                        case 'u': /* trusted-key */
                                FULLCHECK("trusted-key");
-                               fprintf(stderr, ";; +trusted-key option is "
-                                               "deprecated");
-                               break;
+                               fatal("+trusted-key option "
+                                     "no longer supported");
                        default:
                                goto invalid_option;
                        }
@@ -2509,9 +2506,8 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
                        switch (cmd[2]) {
                        case 'e':
                                FULLCHECK("unexpected");
-                               fprintf(stderr, ";; +unexpected option "
-                                               "is deprecated");
-                               break;
+                               fatal("+unexpected option "
+                                     "no longer supported");
                        case 'k':
                                FULLCHECK("unknownformat");
                                lookup->print_unknown_format = state;
@@ -2519,11 +2515,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
                        default:
                                goto invalid_option;
                        }
-                       break;
-               default:
-                       goto invalid_option;
                }
-
                break;
        case 'v':
                FULLCHECK("vc");
@@ -2629,14 +2621,12 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                        exit(0);
                        break;
                case 'i':
-                       /* deprecated */
-                       break;
+                       fatal("-%c removed", option[0]);
                case 'm': /* memdebug */
                        /* memdebug is handled in preparse_args() */
                        break;
                case 'n':
-                       /* deprecated */
-                       break;
+                       fatal("-%c removed", option[0]);
                case 'r':
                        debug("digrc (late)");
                        digrc = false;
index 71dce3ec36e0c955ffa53042eaf73ca1907a93c2..83c0ab7acf758ab15a3430fd7f0023a690cfa8b2 100644 (file)
@@ -614,11 +614,6 @@ abbreviation is unambiguous; for example, :option:`+cd` is equivalent to
 
    This option performs [or does not perform] a search showing intermediate results.
 
-.. option:: +sigchase, +nosigchase
-
-   This feature is now obsolete and has been removed; use :iscman:`delv`
-   instead.
-
 .. option:: +split=W
 
    This option splits long hex- or base64-formatted fields in resource records into
@@ -688,25 +683,23 @@ abbreviation is unambiguous; for example, :option:`+cd` is equivalent to
    server TLS certificate verification. Otherwise, the DNS server name
    is used. This option has no effect if :option:`+tls-ca` is not specified.
 
-.. option:: +topdown, +notopdown
-
-   This feature is related to :option:`dig +sigchase`, which is obsolete and
-   has been removed. Use :iscman:`delv` instead.
-
 .. option:: +trace, +notrace
 
-   This option toggles tracing of the delegation path from the root name servers for
-   the name being looked up. Tracing is disabled by default. When
-   tracing is enabled, :program:`dig` makes iterative queries to resolve the
-   name being looked up. It follows referrals from the root servers,
-   showing the answer from each server that was used to resolve the
-   lookup.
+   This option toggles tracing of the delegation path from the root name
+   servers for the name being looked up. Tracing is disabled by default.
+   When tracing is enabled, :program:`dig` makes iterative queries to
+   resolve the name being looked up. It follows referrals from the root
+   servers, showing the answer from each server that was used to resolve
+   the lookup.
 
    If ``@server`` is also specified, it affects only the initial query for
    the root zone name servers.
 
-   :option:`+dnssec` is also set when :option:`+trace` is set, to better emulate the
-   default queries from a name server.
+   :option:`+dnssec` is set when :option:`+trace` is set, to better
+   emulate the default queries from a name server.
+
+   Note that the ``delv +ns`` option can also be used for tracing the
+   resolution of a name from the root (see :iscman:`delv`).
 
 .. option:: +tries=T
 
@@ -714,11 +707,6 @@ abbreviation is unambiguous; for example, :option:`+cd` is equivalent to
    instead of the default, 3. If ``T`` is less than or equal to zero,
    the number of tries is silently rounded up to 1.
 
-.. option:: +trusted-key=####
-
-   This option formerly specified trusted keys for use with :option:`dig +sigchase`. This
-   feature is now obsolete and has been removed; use :iscman:`delv` instead.
-
 .. option:: +ttlid, +nottlid
 
    This option displays [or does not display] the TTL when printing the record.
index d83dae76bea9007a27602d2c82940db7d235392e..4a8dc512b033f0f810d4e813ed375d4d3df1678d 100644 (file)
@@ -53,8 +53,7 @@ export LC_ALL
 # 1. http://www.unicode.org/reports/tr46/#Deviations
 # 2. http://www.unicode.org/reports/tr46/#IDNAComparison
 
-# Using dig insecure mode as we are not testing DNSSEC here
-DIGCMD="$DIG -i -p ${PORT} @10.53.0.1"
+DIGCMD="$DIG -p ${PORT} @10.53.0.1"
 
 # Initialize test count and status return
 n=0
index 094c4e0dcdcf7dffb411b158dcd41837fc0e2234..1c36679403472538855071b0fa83ff575da94193 100644 (file)
@@ -1693,8 +1693,7 @@ dash_option(const char *option, char *next, struct query *query, bool global,
                        exit(0);
                        break;
                case 'i':
-                       /* deprecated */
-                       break;
+                       fatal("-%c removed", opt);
                case 'm':
                        /*
                         * handled by preparse_args()