search for: quit_pend

Displaying 20 results from an estimated 29 matches for "quit_pend".

2023 Nov 08
2
Delay in starting programs on FreeBSD via ssh after upgrade OpenBSD from 7.3 to 7.4
...ientloop.c index deebbba..cb69c72 100644 --- a/clientloop.c +++ b/clientloop.c @@ -580,7 +580,7 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout, if (options.obscure_keystroke_timing_interval <= 0) return 1; /* disabled in config */ - if (!channel_still_open(ssh) || quit_pending) { + if (!channel_tty_open(ssh) || quit_pending) { /* Stop if no channels left of we're waiting for one to close */ stop_reason = "no active channels"; } else if (ssh_packet_is_rekeying(ssh)) {
2001 Oct 29
0
signal messages
...nd signal to remote program: 0 disabled, 1 enabled, 2 pending */ +static volatile int send_signal = 0; /* Flag indicating whether the user\'s terminal is in non-blocking mode. */ static int in_non_blocking_mode = 0; @@ -173,7 +175,10 @@ signal_handler(int sig) { received_signal = sig; - quit_pending = 1; + if (send_signal == 1) + send_signal = 2; + else + quit_pending = 1; } /* @@ -765,6 +770,26 @@ leave_raw_mode(); } +static char * +sig2name(int sig) +{ +#define SIG(x) if (sig == SIG ## x) return #x + SIG(ABRT); + SIG(ALRM); + SIG(FPE); + SIG(HUP); + SIG(ILL); + SIG(INT); + SIG...
2015 Feb 20
3
SUCCESS: OpenSSH_6.7p1-snap20150220
Compiled OK, and operating nicely on CentOS 6.6, both 32/64 bit. Really appreciate the UpdateHostkeys feature! One issue I noticed, the screen output gets garbled if the user has been "asked" to "Accept" the new hostkeys. Looks like the screen output is missing the CR's, and only LF's get presented. [root at be2 .ssh]# ssh be1 ls -l Warning: Permanently added
2023 Feb 01
16
[Bug 3531] New: Ssh will not exit when it receives SIGTERM before calling poll in client_wait_until_can_do_something until some events happen.
https://bugzilla.mindrot.org/show_bug.cgi?id=3531 Bug ID: 3531 Summary: Ssh will not exit when it receives SIGTERM before calling poll in client_wait_until_can_do_something until some events happen. Product: Portable OpenSSH Version: 9.1p1 Hardware: Other OS: Linux Status:
2001 Sep 28
1
[PATCH] fix for Linux hang on exit bug in 2.9.9p2
...er; + } else { + timerp=NULL; + } + + rc=select((*maxfdp)+1, *readsetp, *writesetp, NULL, timerp); + if (rc < 0) { char buf[100]; /* @@ -381,7 +398,8 @@ snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno)); buffer_append(&stderr_buffer, buf, strlen(buf)); quit_pending = 1; - } + } else if (rc == 0 && session_status == SessionWait) + session_status=SessionClose; } static void @@ -442,9 +460,12 @@ len = read(connection_in, buf, sizeof(buf)); if (len == 0) { /* Received EOF. The remote host has closed the connection. */ +/* This message d...
2002 Jan 31
4
signal transmission in ssh2
...to remote program: 0 disabled, 1 enabled, 2 pending */ +static volatile sig_atomic_t send_signal = 0; /* Flag indicating whether the user\'s terminal is in non-blocking mode. */ static int in_non_blocking_mode = 0; @@ -173,7 +175,10 @@ signal_handler(int sig) { received_signal = sig; - quit_pending = 1; + if (send_signal == 1) + send_signal = 2; + else + quit_pending = 1; } /* @@ -765,6 +770,26 @@ leave_raw_mode(); } +static char * +sig2name(int sig) +{ +#define SIG(x) if (sig == SIG ## x) return #x + SIG(ABRT); + SIG(ALRM); + SIG(FPE); + SIG(HUP); + SIG(ILL); + SIG(INT); + SIG...
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
...er; + } else { + timerp=NULL; + } + + rc=select((*maxfdp)+1, *readsetp, *writesetp, NULL, timerp); + if (rc < 0) { char buf[100]; /* @@ -384,7 +400,8 @@ snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno)); buffer_append(&stderr_buffer, buf, strlen(buf)); quit_pending = 1; - } + } else if (rc == 0 && session_status == SessionWait) + session_status=SessionClose; } static void @@ -445,9 +462,12 @@ len = read(connection_in, buf, sizeof(buf)); if (len == 0) { /* Received EOF. The remote host has closed the connection. */ +/* This message d...
2002 Jan 27
0
[PATCH] Fix for hang-on-exit bug in OpenSSH-3.0.2p1
...d EOF. The remote host has closed the connection. */ +/* This message duplicates the one already in client_loop(). */ +#if 0 snprintf(buf, sizeof buf, "Connection to %.300s closed by remote host.\r\n", host); buffer_append(&stderr_buffer, buf, strlen(buf)); +#endif quit_pending = 1; return; } diff -ur openssh-3.0.2p1/session.c openssh-3.0.2p1J2/session.c --- openssh-3.0.2p1/session.c Sat Dec 1 16:37:08 2001 +++ openssh-3.0.2p1J2/session.c Sat Jan 19 15:56:32 2002 @@ -1929,6 +1929,8 @@ */ if (c->ostate != CHAN_OUTPUT_CLOSED) chan_write_failed(c); + if...
2003 Aug 22
0
Client does not propagate EPIPE write error to server.
...sed and hangs ... It seems that with v2, EOF on input descriptors are propagated to the peer as EOF, but there is no corresponding protocol mechanism in the v2 protocol for indicating that an output file descriptor is closed? Is this correct? If so, it seems horribly broken. The v1 code sets quit_pending=1, and exits the select loop. I have a hack that does something equally ugly for v2 by creating a channel state notifier callback, and only registering it for the session_ident in the clientloop setup. Any better ideas? Please CC me, as I'm not subscribed. Regards, Bill Rugolsky
2007 Jul 23
0
ControlPersist + IdleTimeout
...If you exit by ~. or closing your terminal window, the daemonizing code doesn't run. Can someone please explain to me how client_channel_closed() is called upon normal termination? I have a hard time gleaning it from the code. I'm thinking to let the connection be daemonized when quit_pending is true in the client loop, but I'm also not sure if that catches all non-fatal exits that happen to ssh. Any comments? Note that in the bug Damien proposes to fork the master first, before running the real session. However, that means that if creating a master connection fails, th...
2008 Jun 19
5
Portforwarding using the control master.
Hi all, currently I am considering writing a patch for OpenSSH that will allow portforwarding using the control_master unix domain socket. The idea is to introduce an extra SSHMUX command, SSHMUX_COMMAND_SOCKS, which will then pass control to the normal socks functions used for dynamic forwarding. The main reason for me to write this patch are: - some more control over who gets to connect to
2001 Mar 14
1
[PATCH] Added Null packet keepalive option
...{ + switch (select((*maxfdp)+1, *readsetp, *writesetp, NULL, ((tv.tv_sec)?(&tv):NULL))) { + case -1: { char buf[100]; /* @@ -420,7 +425,21 @@ snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno)); buffer_append(&stderr_buffer, buf, strlen(buf)); quit_pending = 1; - } + + } + break; + + case 0: + /* Send a keepalive packet (not SSH_MSG_IGNORE as this crashes + * some servers...). + */ + packet_start(SSH_MSG_NONE); +...
2006 Apr 22
2
bug & patch in ServerAliveInterval (openssh 4.3-p2)
Hi openssh-unix-dev subscribers :) I have found that ServerAliveInterval & ServerAliveCountMax have some bug. Basically the ssh-alive check function (that verify the peer is alive) is called only if no data at all gets into ssh (when it should work only for server channel).I am pretty sure developers know about this ..anyway I have tried to fix this issue. Here is the patch: diff -rNu
2010 Jan 14
1
ssh(1) multiplexing rewrite
.../* XXX use mux_client_cleanup() instead */ /* * Name of the host we are connecting to. This is the name given on the @@ -138,7 +138,7 @@ static volatile sig_atomic_t received_si static int in_non_blocking_mode = 0; /* Common data for the client loop code. */ -static volatile sig_atomic_t quit_pending; /* Set non-zero to quit the loop. */ +volatile sig_atomic_t quit_pending; /* Set non-zero to quit the loop. */ static int escape_char1; /* Escape character. (proto1 only) */ static int escape_pending1; /* Last character was an escape (proto1 only) */ static int last_was_cr; /* Last characte...
2001 Nov 09
4
keystroke timing attack
I'm reading this fine article on O'Reilly: http://linux.oreillynet.com/lpt/a//linux/2001/11/08/ssh_keystroke.html <quote> The paper concludes that the keystroke timing data observable from today's SSH implementations reveals a dangerously significant amount of information about user terminal sessions--enough to locate typed passwords in the session data stream and reduce the
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 May 18
0
PATCH: implement delay (sleep) after last tunnelled connection exits
...er; + } else { + timerp=NULL; + } + + rc=select((*maxfdp)+1, *readsetp, *writesetp, NULL, timerp); + if (rc < 0) { char buf[100]; /* @@ -379,7 +400,8 @@ snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno)); buffer_append(&stderr_buffer, buf, strlen(buf)); quit_pending = 1; - } + } else if (rc == 0 && session_status == SessionWait) + session_status=SessionClose; } void @@ -751,7 +773,7 @@ if (id != session_ident) error("client_channel_closed: id %d != session_ident %d", id, session_ident); - session_closed = 1; + session_stat...
2002 Jan 27
0
[PATCH] Add an exit delay to Openssh-3.0.2p1 for use in tunneling
...er; + } else { + timerp=NULL; + } + + rc=select((*maxfdp)+1, *readsetp, *writesetp, NULL, timerp); + if (rc < 0) { char buf[100]; /* @@ -384,7 +399,8 @@ snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno)); buffer_append(&stderr_buffer, buf, strlen(buf)); quit_pending = 1; - } + } else if (rc == 0 && session_status == SessionWait) + session_status=SessionClose; } static void @@ -760,7 +776,7 @@ error("client_channel_closed: id %d != session_ident %d", id, session_ident); channel_cancel_cleanup(id); - session_closed = 1; + s...
2001 Sep 26
1
[PATCH] random SSH_MSG_IGNORE packets
...usec); + } + else tvp = NULL; + + ret = select((*maxfdp)+1, *readsetp, *writesetp, NULL, tvp); + if (ret < 0) { char buf[100]; /* @@ -379,6 +398,17 @@ snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno)); buffer_append(&stderr_buffer, buf, strlen(buf)); quit_pending = 1; + } + else if (ret == 0) { + /* + * select() timed out. Send a SSH[2]_MSG_IGNORE packet of random + * size between 1 - 64 bytes. + */ + u_int32_t rand = arc4random(); + packet_send_ignore((rand & 0x3f) + 1); + packet_send(); + packet_write_wait(); + debug3("Sent SSH_M...