]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cli: correct commentary and replace 'set global-key' name
authorErwan Le Goas <elegoas@haproxy.com>
Thu, 29 Sep 2022 08:36:11 +0000 (10:36 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 29 Sep 2022 08:53:15 +0000 (10:53 +0200)
Correct a commentary in in include/haproxy/global-t.h and include/haproxy/tools.h
Replace the CLI command 'set global-key <key>' by 'set anon global-key <key>' in
order to find it easily when you don't remember it, the recommandation can guide
you when you just tap 'set anon'.

No backport needed, except if anonymization mechanism is backported.

doc/management.txt
include/haproxy/global-t.h
include/haproxy/tools.h
src/cli.c

index 2561aee6bed5b702632127a248fe287f4852d5b0..3b3b26af4df9517dc8738a9a29c35614db44cac9 100644 (file)
@@ -2208,7 +2208,7 @@ set anon [on|off] [<key>]
   to spot bugs, but a low enough bit count (24) to make them non-reversible due
   to the high number of possible matches. When turned on, if no key is
   specified, the global key will be used (either specified in the configuration
-  file by "anonkey" or set via the CLI command "set global-key"). If no such
+  file by "anonkey" or set via the CLI command "set anon global-key"). If no such
   key was set, a random one will be generated. Otherwise it's possible to
   specify the 32-bit key to be used for the current session, for example, to
   reuse the key that was used in a previous dump to help compare outputs.
@@ -2220,7 +2220,7 @@ set dynamic-cookie-key backend <backend> <value>
   Modify the secret key used to generate the dynamic persistent cookies.
   This will break the existing sessions.
 
-set global-key <key>
+set anon global-key <key>
   This sets the global anonymizing key to <key>, which must be a 32-bit
   integer between 0 and 4294967295 (0 disables the global key). This command
   requires admin privilege.
index 7840eabff477aa3cd32c159cf9784dc6c25ea24f..1c7f45b3afa8d7ceef01dbb067ed035d1427b47e 100644 (file)
@@ -42,7 +42,7 @@
 #define        MODE_STOPPING   0x1000  /* the process is in the deinit phase, the event loop is not running anymore. */
 #define        MODE_DUMP_LIBS  0x2000  /* dump loaded libraries at the end of init phase */
 #define        MODE_DUMP_KWD   0x4000  /* dump registered keywords (see kwd_dump for the list) */
-#define        MODE_DUMP_CFG   0x8000 /* dump the configure file */
+#define        MODE_DUMP_CFG   0x8000  /* dump the configuration file */
 #define        MODE_DUMP_NB_L  0x10000 /* dump line numbers when the configuration file is dump */
 
 /* list of last checks to perform, depending on config options */
index 320646a5deeb01b13423c292cbcc4a5ec94c0b06..3377ed03f04d385535d5ee02643f63f4e6fc315b 100644 (file)
@@ -63,7 +63,7 @@
 /* use if you want to return a simple hash. Key 0 doesn't hash. */
 #define HA_ANON_STR(key, str) hash_anon(key, str, "", "")
 
-/* use if you want to return a hash like : IP('hash'). Key 0 doesn't hash. */
+/* use if you want to return a hash like : ID('hash'). Key 0 doesn't hash. */
 #define HA_ANON_ID(key, str) hash_anon(key, str, "ID(", ")")
 
 /* use if you want to return a hash like : PATH('hash'). Key 0 doesn't hash. */
index a2eb87aea21ac2870630530d64fbafd62726525c..5635ea8263dfe74da7ee5b3ea89916789b829398 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -3278,7 +3278,7 @@ static struct cli_kw_list cli_kws = {{ },{
        { { "experimental-mode", NULL },         NULL,                                                                                                cli_parse_expert_experimental_mode, NULL, NULL, NULL, ACCESS_MASTER }, // not listed
        { { "mcli-debug-mode", NULL },         NULL,                                                                                                  cli_parse_expert_experimental_mode, NULL, NULL, NULL, ACCESS_MASTER_ONLY }, // not listed
        { { "set", "anon", NULL },               "set anon <setting> [value]              : change the anonymized mode setting",                      cli_parse_set_anon, NULL, NULL },
-       { { "set", "global-key", NULL },         "set global-key <value>                  : change the global anonymizing key",                       cli_parse_set_global_key, NULL, NULL },
+       { { "set", "anon", "global-key", NULL }, "set anon global-key <value>             : change the global anonymizing key",                       cli_parse_set_global_key, NULL, NULL },
        { { "set", "maxconn", "global",  NULL }, "set maxconn global <value>              : change the per-process maxconn setting",                  cli_parse_set_maxconn_global, NULL },
        { { "set", "rate-limit", NULL },         "set rate-limit <setting> <value>        : change a rate limiting value",                            cli_parse_set_ratelimit, NULL },
        { { "set", "severity-output",  NULL },   "set severity-output [none|number|string]: set presence of severity level in feedback information",  cli_parse_set_severity_output, NULL, NULL },