[PATCH v22 6/9] argp: do not display option name translations if __libc_enable_secure
Vivien Kraus
vivien@planete-kraus.eu
Thu Apr 23 16:04:04 GMT 2026
---
argp/argp-help.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/argp/argp-help.c b/argp/argp-help.c
index 0cacf19e33..aad5d7be13 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -1215,6 +1215,9 @@ translate_option_name (const char *name, char **allocated)
one is used. */
/* FIXME: use pgettext_expr. */
*allocated = NULL;
+ if (__libc_enable_secure)
+ /* Translations are disabled. */
+ return name;
if (__asprintf (allocated, "command-line option\004%s", name) == -1)
{
/* *allocated is NULL */
--
2.52.0
More information about the Libc-alpha
mailing list