+4867. [cleanup] Normalize rndc on/off commands (validation and
+ querylog) so they accept the same synonyms
+ for on/off (yes/no, true/false, enable/disable).
+ Thanks to Tony Finch. [RT #47022]
+
4866. [port] DST library initialization verifies MD5 (when MD5
was not disabled) and SHA-1 hash and HMAC support.
[RT #46764]
return (ISC_R_UNEXPECTEDEND);
ptr = next_token(lex, NULL);
- if (ptr == NULL)
- value = server->log_queries ? ISC_FALSE : ISC_TRUE;
- else if (strcasecmp(ptr, "yes") == 0 || strcasecmp(ptr, "on") == 0)
+ if (ptr == NULL) {
+ value = !prev;
+ } else if (!strcasecmp(ptr, "on") || !strcasecmp(ptr, "yes") ||
+ !strcasecmp(ptr, "enable") || !strcasecmp(ptr, "true")) {
value = ISC_TRUE;
- else if (strcasecmp(ptr, "no") == 0 || strcasecmp(ptr, "off") == 0)
+ } else if (!strcasecmp(ptr, "off") || !strcasecmp(ptr, "no") ||
+ !strcasecmp(ptr, "disable") || !strcasecmp(ptr, "false")) {
value = ISC_FALSE;
- else
- return (ISC_R_NOTFOUND);
+ } else {
+ return (DNS_R_SYNTAX);
+ }
if (server->log_queries == value)
return (ISC_R_SUCCESS);
return (ISC_R_UNEXPECTEDEND);
if (!strcasecmp(ptr, "on") || !strcasecmp(ptr, "yes") ||
- !strcasecmp(ptr, "enable") || !strcasecmp(ptr, "true"))
+ !strcasecmp(ptr, "enable") || !strcasecmp(ptr, "true")) {
enable = ISC_TRUE;
- else if (!strcasecmp(ptr, "off") || !strcasecmp(ptr, "no") ||
- !strcasecmp(ptr, "disable") || !strcasecmp(ptr, "false"))
+ } else if (!strcasecmp(ptr, "off") || !strcasecmp(ptr, "no") ||
+ !strcasecmp(ptr, "disable") || !strcasecmp(ptr, "false")) {
enable = ISC_FALSE;
- else if (!strcasecmp(ptr, "check"))
+ } else if (!strcasecmp(ptr, "check") || !strcasecmp(ptr, "status")) {
set = ISC_FALSE;
- else
+ } else {
return (DNS_R_SYNTAX);
+ }
/* Look for the view name. */
ptr = next_token(lex, text);
nta -remove domain [view]\n\
Remove a negative trust anchor, re-enabling validation\n\
for the given domain.\n\
- querylog newstate\n\
+ querylog [ on | off ]\n\
Enable / disable query logging.\n\
reconfig Reload configuration file and new zones only.\n\
recursing Dump the queries that are currently recursing (named.recursing)\n\
Delete a TKEY-negotiated TSIG key.\n\
tsig-list List all currently active TSIG keys, including both statically\n\
configured and TKEY-negotiated keys.\n\
- validation newstate [view]\n\
+ validation [ yes | no | status ] [view]\n\
Enable / disable DNSSEC validation.\n\
zonestatus zone [class [view]]\n\
Display the current status of a zone.\n\
</varlistentry>
<varlistentry>
- <term><userinput>querylog</userinput> <optional>on|off</optional> </term>
+ <term><userinput>querylog</userinput> <optional> on | off </optional> </term>
<listitem>
<para>
Enable or disable query logging. (For backward
</varlistentry>
<varlistentry>
- <term><userinput>validation ( on | off | check ) <optional><replaceable>view ...</replaceable></optional> </userinput></term>
+ <term><userinput>validation ( on | off | status ) <optional><replaceable>view ...</replaceable></optional> </userinput></term>
<listitem>
<para>
Enable, disable, or check the current status of