summaryrefslogtreecommitdiffstats
path: root/channels.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2023-01-18 02:00:10 +0000
committerDamien Miller <djm@mindrot.org>2023-01-18 13:21:00 +1100
commit35253af01d8c0ab444c8377402121816e71c71f5 (patch)
tree7c53bab1ad578467d88c0b97032ce35d9724ddd9 /channels.h
parent7d17ea151c0b2519f023bd9cc7f141128833ac47 (diff)
upstream: when restoring non-blocking mode to stdio fds, restore
exactly the flags that ssh started with and don't just clobber them with zero, as this could also remove the append flag from the set; bz3523; ok dtucker@ OpenBSD-Commit-ID: 1336b03e881db7564a4b66014eb24c5230e9a0c0
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels.h b/channels.h
index c80b55d0..101843a0 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.h,v 1.147 2023/01/06 02:47:18 djm Exp $ */
+/* $OpenBSD: channels.h,v 1.148 2023/01/18 02:00:10 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -153,6 +153,7 @@ struct Channel {
* this way post-IO handlers are not
* accidentally called if a FD gets reused */
int restore_block; /* fd mask to restore blocking status */
+ int restore_flags[3];/* flags to restore */
struct sshbuf *input; /* data read from socket, to be sent over
* encrypted connection */
struct sshbuf *output; /* data received over encrypted connection for