aboutsummaryrefslogtreecommitdiffstats
path: root/sm/gpgsm.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-03-26 14:46:56 +0000
committerWerner Koch <[email protected]>2024-03-26 14:46:56 +0000
commitf9919bcc48831fcb7aa01cd6ce9d8028a6485e99 (patch)
treedd849c0253ee5c27c3cd85a8b0b1a2ae36f42ed7 /sm/gpgsm.c
parentscd: Add new OpenPGP vendor (diff)
downloadgnupg-f9919bcc48831fcb7aa01cd6ce9d8028a6485e99.tar.gz
gnupg-f9919bcc48831fcb7aa01cd6ce9d8028a6485e99.zip
gpg,gpgsm: New option --disable-fd-translation.
* common/sysutils.c (no_translate_sys2libc_fd) [W32]: New global. (disable_translate_sys2libc_fd): New. (translate_sys2libc_fd): Make static and cobuild only for Windows. (translate_sys2libc_fd_int): Use no_translate_sys2libc_fd flag. * g10/gpg.c, sm/gpgsm.c (oDisableFdTranslation): New const. (opts): Add option "disable-fd-translation". (main): Set option. -- GnuPG-bug-id: 7060
Diffstat (limited to 'sm/gpgsm.c')
-rw-r--r--sm/gpgsm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index 7c866d0b8..b1a5f09b5 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -117,6 +117,7 @@ enum cmd_and_opt_values {
oLogTime,
oEnableSpecialFilenames,
+ oDisableFdTranslation,
oAgentProgram,
oDisplay,
@@ -428,6 +429,7 @@ static gpgrt_opt_t opts[] = {
ARGPARSE_s_n (oAnswerNo, "no", N_("assume no on most questions")),
ARGPARSE_s_i (oStatusFD, "status-fd", N_("|FD|write status info to this FD")),
ARGPARSE_s_n (oEnableSpecialFilenames, "enable-special-filenames", "@"),
+ ARGPARSE_s_n (oDisableFdTranslation, "disable-fd-translation", "@"),
ARGPARSE_s_i (oPassphraseFD, "passphrase-fd", "@"),
ARGPARSE_s_s (oPinentryMode, "pinentry-mode", "@"),
@@ -1461,6 +1463,10 @@ main ( int argc, char **argv)
enable_special_filenames ();
break;
+ case oDisableFdTranslation:
+ disable_translate_sys2libc_fd ();
+ break;
+
case oValidationModel: parse_validation_model (pargs.r.ret_str); break;
case oKeyServer: