summaryrefslogtreecommitdiffstats
path: root/mux.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2023-08-18 03:37:41 +0200
committerDamien Miller <djm@mindrot.org>2023-08-18 04:02:41 +0200
commit803e22eabd3ba75485eedd8b7b44d6ace79f2052 (patch)
tree8518a57b415c25f65bdf4d87103ee618df2fdcfc /mux.c
parentupstream: defence-in-depth MaxAuthTries check in monitor; ok markus (diff)
downloadopenssh-803e22eabd3ba75485eedd8b7b44d6ace79f2052.tar.xz
openssh-803e22eabd3ba75485eedd8b7b44d6ace79f2052.zip
upstream: fix regression in OpenSSH 9.4 (mux.c r1.99) that caused
multiplexed sessions to ignore SIGINT under some circumstances. Reported by / feedback naddy@, ok dtucker@ OpenBSD-Commit-ID: 4d5c6c894664f50149153fd4764f21f43e7d7e5a
Diffstat (limited to 'mux.c')
-rw-r--r--mux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mux.c b/mux.c
index 3a0f87674..d9d5e7d99 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.99 2023/08/04 06:32:40 dtucker Exp $ */
+/* $OpenBSD: mux.c,v 1.100 2023/08/18 01:37:41 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@@ -1480,7 +1480,9 @@ mux_client_read(int fd, struct sshbuf *b, size_t need, int timeout_ms)
case EWOULDBLOCK:
#endif
case EAGAIN:
- if (waitrfd(fd, &timeout_ms) == -1)
+ if (waitrfd(fd, &timeout_ms,
+ &muxclient_terminate) == -1 &&
+ errno != EINTR)
return -1; /* timeout */
/* FALLTHROUGH */
case EINTR: