aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-06-28 04:51:22 +0000
committerNIIBE Yutaka <[email protected]>2024-06-28 04:51:22 +0000
commitc4ff9c5def1aaf76f7cec82d9aa7e5cb1b77f044 (patch)
tree8f5ee091effe56433cee189d2112f6607b234fed
parentagent: Initialize thread_startup.fd for pipe connection. (diff)
downloadgnupg-c4ff9c5def1aaf76f7cec82d9aa7e5cb1b77f044.tar.gz
gnupg-c4ff9c5def1aaf76f7cec82d9aa7e5cb1b77f044.zip
agent: Require use of "SCD DEVINFO --watch" command with socket.
* agent/call-scd.c (agent_card_devinfo): Check if client connects by a socket. -- GnuPG-bug-id: 7151 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--agent/call-scd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/agent/call-scd.c b/agent/call-scd.c
index 70bd78e94..dd13c8e1d 100644
--- a/agent/call-scd.c
+++ b/agent/call-scd.c
@@ -1189,6 +1189,9 @@ agent_card_devinfo (ctrl_t ctrl, void *assuan_context)
int rc;
gnupg_fd_t client_fds[2];
+ if (ctrl->thread_startup.fd == GNUPG_INVALID_FD)
+ return GPG_ERR_INV_HANDLE;
+
rc = daemon_start (DAEMON_SCD, ctrl, 1);
if (rc)
return rc;