[PATCH v20 07/11] argp: do not display option name translations if __libc_enable_secure
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Jan 28 19:30:04 GMT 2026
I think it makes sense to avoid it for setuid bianries.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
On 27/01/26 16:18, Vivien Kraus wrote:
> ---
> argp/argp-help.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/argp/argp-help.c b/argp/argp-help.c
> index b38e6b9ea7..39478113ee 100644
> --- a/argp/argp-help.c
> +++ b/argp/argp-help.c
> @@ -1218,6 +1218,9 @@ canonical_option_translation (const char *name,
> char *full_msgid = NULL;
> const char *all_names = NULL;
> *allocated = NULL;
> + if (__libc_enable_secure)
> + /* Translations are disabled. */
> + return name;
> if (__asprintf (&full_msgid, "command-line option\004%s", name) == -1)
> {
> /* *allocated is NULL */
More information about the Libc-alpha
mailing list