search for: channel_find_open

Displaying 9 results from an estimated 9 matches for "channel_find_open".

2023 Nov 08
2
Delay in starting programs on FreeBSD via ssh after upgrade OpenBSD from 7.3 to 7.4
...r (i = 0; i < ssh->chanctxt->channels_alloc; i++) { + c = ssh->chanctxt->channels[i]; + if (c == NULL || c->type != SSH_CHANNEL_OPEN) + continue; + if (c->client_tty) + return 1; + } + return 0; +} + /* Returns the id of an open channel suitable for keepaliving */ int channel_find_open(struct ssh *ssh) diff --git a/channels.h b/channels.h index 7cfba92..c31733f 100644 --- a/channels.h +++ b/channels.h @@ -337,6 +337,7 @@ int channel_output_poll(struct ssh *); int channel_not_very_much_buffered_data(struct ssh *); void channel_close_all(struct ssh *); int channel...
2001 May 04
19
SSH connection hanging on logout
I am running OpenSSH 2.9p1 on SunOS 5.7 w/4-24-2001 patch cluster. Like many other users I am seeing the hanging session on logout with background processes. This is a huge problem for me as I centrally manage 50+ machines with rdist across ssh. Instead of just complaining about the problem I thought I would put my CS degree to use and try to track down the problem myself. For starters,
2001 Jul 26
1
Tru64 Unix vs. OpenSSH 2.9p2
...*********** *** 736,742 **** xfree(writeset); signal(SIGCHLD, SIG_DFL); ! while ((pid = waitpid(-1, &status, WNOHANG)) > 0) session_close_by_pid(pid, status); channel_stop_listening(); } --- 737,745 ---- xfree(writeset); signal(SIGCHLD, SIG_DFL); ! while ((fd = channel_find_open()) >= 0) ! channel_free(fd); ! while ((pid = waitpid(-1, &status, 0)) > 0) session_close_by_pid(pid, status); channel_stop_listening(); }
2001 Sep 28
1
[PATCH] fix for Linux hang on exit bug in 2.9.9p2
...22:12:43 2001 @@ -1527,8 +1527,18 @@ c = channels[i]; if (c == NULL) continue; - if (ftab[c->type] != NULL) + if (ftab[c->type] != NULL) { + if(c->istate == CHAN_INPUT_OPEN && c->rfd == -1) { + int type=c->type; + c->type=SSH_CHANNEL_CLOSED; + if(channel_find_open() == -1) + shutdown(packet_get_connection_out(), + SHUT_RDWR); + c->type=type; + continue; + } (*ftab[c->type])(c, readset, writeset); + } if (chan_is_dead(c)) { /* * we have to remove the fd's from the select mask diff -u openssh-2.9.9p2/channels....
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...OPEN: case SSH_CHANNEL_INPUT_DRAINING: @@ -534,6 +536,7 @@ channel_still_open(void) case SSH_CHANNEL_CLOSED: case SSH_CHANNEL_AUTH_SOCKET: case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_RDYNAMIC: case SSH_CHANNEL_CONNECTING: case SSH_CHANNEL_ZOMBIE: continue; @@ -573,6 +576,7 @@ channel_find_open(void) switch (c->type) { case SSH_CHANNEL_CLOSED: case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_RDYNAMIC: case SSH_CHANNEL_X11_LISTENER: case SSH_CHANNEL_PORT_LISTENER: case SSH_CHANNEL_RPORT_LISTENER: @@ -635,6 +639,7 @@ channel_open_message(void) case SSH_CHANNEL_OPENING:...
2001 Sep 05
2
sshd hangs on logout -- is this a bug?
In the changelog, there is an entry: 20001129 - (djm) Back out all the serverloop.c hacks. sshd will now hang again if there are background children with open fds. Does this mean that this is regarded as expected (and correct) behavior, that should not change in the future, or does it mean that this behavior is a known problem that someone will eventually fix? --Adam -- Adam McKenna
2001 Nov 14
6
[PATCH]: Patch to fix hang on exit bug under Linux and add optional exit delay
...16:02:32 2001 @@ -1553,8 +1553,18 @@ c = channels[i]; if (c == NULL) continue; - if (ftab[c->type] != NULL) + if (ftab[c->type] != NULL) { + if(c->istate == CHAN_INPUT_OPEN && c->rfd == -1) { + int type=c->type; + c->type=SSH_CHANNEL_CLOSED; + if(channel_find_open() == -1) + shutdown(packet_get_connection_out(), + SHUT_RDWR); + c->type=type; + continue; + } (*ftab[c->type])(c, readset, writeset); + } channel_garbage_collect(c); } } diff -ur openssh-3.0p1/channels.h openssh-3.0p1J/channels.h --- openssh-3.0p1/channels....
2001 Jun 20
8
[Lutz.Jaenicke@aet.TU-Cottbus.DE: 2.9p1: HP-UX 10.20 utmp/wtmp handling broken?]
Hi! I am resending the following message about problems with utmp handling. * In the meantime I had some request in private mail from people asking whether I have new information. * The problem is still persistant in 2.9p2. * My own new investigations show, that the problem only appears with protocol 2, not with protocol 1, I therefore only started to note it when protocol 2 became the
2010 Jan 14
1
ssh(1) multiplexing rewrite
...: case SSH_CHANNEL_DYNAMIC: @@ -531,6 +531,7 @@ channel_still_open(void) case SSH_CHANNEL_OPENING: case SSH_CHANNEL_OPEN: case SSH_CHANNEL_X11_OPEN: + case SSH_CHANNEL_MUX_CLIENT: return 1; case SSH_CHANNEL_INPUT_DRAINING: case SSH_CHANNEL_OUTPUT_DRAINING: @@ -562,6 +563,8 @@ channel_find_open(void) case SSH_CHANNEL_X11_LISTENER: case SSH_CHANNEL_PORT_LISTENER: case SSH_CHANNEL_RPORT_LISTENER: + case SSH_CHANNEL_MUX_LISTENER: + case SSH_CHANNEL_MUX_CLIENT: case SSH_CHANNEL_OPENING: case SSH_CHANNEL_CONNECTING: case SSH_CHANNEL_ZOMBIE: @@ -612,6 +615,8 @@ channel_open_...