aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2019-03-25 13:05:52 +0000
committerAndre Heinecke <[email protected]>2019-03-25 13:09:46 +0000
commitb9d2759da19cb70c1f6243498480bea1d7ecaa46 (patch)
tree68bc8be39dfb7cae07701506236bf27805ee7612
parentdoc: fix formatting error (diff)
downloadgnupg-b9d2759da19cb70c1f6243498480bea1d7ecaa46.tar.gz
gnupg-b9d2759da19cb70c1f6243498480bea1d7ecaa46.zip
sm, w32: Translate logger and status fd to handles
* sm/gpgsm.c (main): Call translate_sys2libc_fd_int to convert the FDs. -- This is required to actually pass gpgsm an fd on windows and not a windows handle. For the passphrase-fd this was already done. (cherry picked from commit e4e0804ed123516fa00f8a876a862b2c6d34ba5c)
Diffstat (limited to '')
-rw-r--r--sm/gpgsm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index 52f26e21d..c01d19e5a 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -1281,8 +1281,12 @@ main ( int argc, char **argv)
case oDebugNoChainValidation: opt.no_chain_validation = 1; break;
case oDebugIgnoreExpiration: opt.ignore_expiration = 1; break;
- case oStatusFD: ctrl.status_fd = pargs.r.ret_int; break;
- case oLoggerFD: log_set_fd (pargs.r.ret_int ); break;
+ case oStatusFD:
+ ctrl.status_fd = translate_sys2libc_fd_int (pargs.r.ret_int, 1);
+ break;
+ case oLoggerFD:
+ log_set_fd (translate_sys2libc_fd_int (pargs.r.ret_int, 1));
+ break;
case oWithMD5Fingerprint:
opt.with_md5_fingerprint=1; /*fall through*/
case oWithFingerprint: