From 52fe7f804b6bbe91cdf5a659034ac4cf4d876222 Mon Sep 17 00:00:00 2001 From: djm Date: Tue, 30 Apr 2024 02:14:10 +0000 Subject: [PATCH] =?utf8?q?correctly=20restore=20sigprocmask=20around=20ppo?= =?utf8?q?ll()=20reported=20by=20T=C3=B5ivo=20Leedj=C3=A4rv;=20ok=20deraad?= =?utf8?q?t@?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- usr.bin/ssh/clientloop.c | 4 ++-- usr.bin/ssh/serverloop.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index c4b37a7a4db..79bffbc00b3 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.404 2024/04/30 02:10:49 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.405 2024/04/30 02:14:10 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1576,7 +1576,7 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg, client_wait_until_can_do_something(ssh, &pfd, &npfd_alloc, &npfd_active, channel_did_enqueue, &osigset, &conn_in_ready, &conn_out_ready); - if (sigprocmask(SIG_UNBLOCK, &bsigset, &osigset) == -1) + if (sigprocmask(SIG_SETMASK, &osigset, NULL) == -1) error_f("osigset sigprocmask: %s", strerror(errno)); if (quit_pending) diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c index c669c02ee8d..2e3101ebf7e 100644 --- a/usr.bin/ssh/serverloop.c +++ b/usr.bin/ssh/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.237 2023/08/21 04:59:54 djm Exp $ */ +/* $OpenBSD: serverloop.c,v 1.238 2024/04/30 02:14:10 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -374,7 +374,7 @@ server_loop2(struct ssh *ssh, Authctxt *authctxt) wait_until_can_do_something(ssh, connection_in, connection_out, &pfd, &npfd_alloc, &npfd_active, &osigset, &conn_in_ready, &conn_out_ready); - if (sigprocmask(SIG_UNBLOCK, &bsigset, &osigset) == -1) + if (sigprocmask(SIG_SETMASK, &osigset, NULL) == -1) error_f("osigset sigprocmask: %s", strerror(errno)); if (received_sigterm) { -- 2.20.1