[v22,5/9] posix: do not allow option name translations for secure programs
Checks
| Context |
Check |
Description |
| redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
Commit Message
SETUID / SETGID / AT_SECURE programs should not accept translated
names, so that the programmer knows exactly how the program can be
invoked.
---
posix/getopt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -199,7 +199,7 @@ match_translated_option_name (char *(*translate) (const char *, const char *,
const char *translated = opt_name;
char *translation_buffer = NULL;
bool matches = false;
- if (translate != NULL)
+ if (translate != NULL && !__libc_enable_secure)
translated = translate (opt_textdomain, translation_context,
opt_name, &translation_buffer);