diff options
author | Matt Johnston <matt@ucc.asn.au> | 2021-10-11 15:42:14 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2021-10-11 15:42:14 +0800 |
commit | 87ff9a1a5639d5ceab2c9eb474a31126c50a3033 (patch) | |
tree | ba4ff7a42c56f214d648365cfb3f6e789156c6be /channel.h | |
parent | 03b9152cc83671c11c0e313d07ba1ee7e4ccaa6e (diff) | |
download | dropbear-87ff9a1a5639d5ceab2c9eb474a31126c50a3033.tar.gz |
Replace ChanType.sepfds with Channel.bidir_fd
This handles the case where a svrchansess has separate FDs
for nopty, but a single FD for pty mode.
The use of sepfds was also previously incorrect for X11 and
agent forwarding
Diffstat (limited to 'channel.h')
-rw-r--r-- | channel.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -60,6 +60,9 @@ struct Channel { int readfd; /* read from insecure side, written to wire */ int errfd; /* used like writefd or readfd, depending if it's client or server. Doesn't exactly belong here, but is cleaner here */ + int bidir_fd; /* a boolean indicating that writefd/readfd are the same + file descriptor (bidirectional), such as a network socket or PTY. + That is handled differently when closing FDs */ circbuffer *writebuf; /* data from the wire, for local consumption. Can be initially NULL */ circbuffer *extrabuf; /* extended-data for the program - used like writebuf @@ -87,7 +90,6 @@ struct Channel { struct ChanType { - int sepfds; /* Whether this channel has separate pipes for in/out or not */ const char *name; /* Sets up the channel */ int (*inithandler)(struct Channel*); |