1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-11 21:48:50 +01:00

sm: Fix calling of open_stream_nc.

* sm/server.c (cmd_import): Use mode "r".
(cmd_message): Likewise.

--

The system handle should be already configured as binary
when passed to Assuan.

GnuPG-bug-id: 6580
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-07-13 14:20:52 +09:00
parent 20bf90bdce
commit 635a7fef4d
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -680,7 +680,7 @@ cmd_import (assuan_context_t ctx, char *line)
if (fd == GNUPG_INVALID_FD)
return set_error (GPG_ERR_ASS_NO_INPUT, NULL);
fp = open_stream_nc (fd, "rb");
fp = open_stream_nc (fd, "r");
if (!fp)
return set_error (GPG_ERR_ASS_NO_INPUT, NULL);
@ -905,7 +905,7 @@ cmd_message (assuan_context_t ctx, char *line)
if (rc)
return rc;
fp = open_stream_nc (fd, "rb");
fp = open_stream_nc (fd, "r");
if (!fp)
return set_error (GPG_ERR_ASS_NO_INPUT, NULL);
ctrl->server_local->message_fp = fp;