search for: packet_get_connection_out

Displaying 16 results from an estimated 16 matches for "packet_get_connection_out".

2001 Oct 31
2
suggested fix for the sigchld race
...e client, mark that @@ -278,6 +319,8 @@ error("select: %.100s", strerror(errno)); } else if (ret == 0 && client_alive_scheduled) client_alive_check(); + + notify_done(*readsetp); } /* @@ -467,6 +510,8 @@ connection_in = packet_get_connection_in(); connection_out = packet_get_connection_out(); + notify_setup(); + previous_stdout_buffer_bytes = 0; /* Set approximate I/O buffer size. */ @@ -572,6 +617,7 @@ max_fd = MAX(max_fd, fdin); max_fd = MAX(max_fd, fdout); max_fd = MAX(max_fd, fderr); + max_fd = MAX(max_fd, notify_pipe[0]); /* Sleep in select() until we can...
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,
2000 Mar 01
0
Problem in sshconnect.c?
...gards, Paul Tiemann //------------- Here's a code snip from the sshconnect.c file below void ssh_exchange_identification() { char buf[256], remote_version[256]; /* must be same size! */ int remote_major, remote_minor, i; int connection_in = packet_get_connection_in(); int connection_out = packet_get_connection_out(); /* Read other side\'s version identification. */ for (i = 0; i < sizeof(buf) - 1; i++) { buf[i + 1] = 0; if (read(connection_in, &buf[i], 1) != 1) fatal("ssh_exchange_identification: read: %.100s", strerror(errno)); if (buf[i] == '\r') { buf[i] = ...
2001 Oct 13
0
local IP in environment
...ket, 0, NI_NAMEREQD); } + const char * + get_local_ipaddr2(void) + { + static char *canonical_host_ip = NULL; + + /* Check whether we have cached the ipaddr. */ + if (canonical_host_ip == NULL) { + if (packet_connection_is_on_socket()) { + canonical_host_ip = + get_local_ipaddr(packet_get_connection_out()); + if (canonical_host_ip == NULL) + fatal_cleanup(); + } else { + /* If not on socket, return UNKNOWN. */ + canonical_host_ip = xstrdup("UNKNOWN"); + } + } + return canonical_host_ip; + } + + /* * Returns the IP-address of the remote host as a string. The ret...
2004 Mar 26
2
Patch for login exchange timeout
...grace_alarm_handler(int sig) + { + /* Log error and exit. */ + fatal("Timeout before authentication"); } + + /* * Waits for the server identification string, and sends our own * identification string. */ *************** *** 441,446 **** --- 451,462 ---- int connection_out = packet_get_connection_out(); int minor1 = PROTOCOL_MINOR_1; + /* Setup a handler for banner prompt */ + if (options.connection_timeout > 0) { + signal(SIGALRM, grace_alarm_handler); + alarm(options.connection_timeout); + } + /* Read other side\'s version identification. */ for (;;) { for (i...
2000 Oct 30
1
Compatibility with 1.2.16 (commercial)?
Hi folks, I'm currently trying to connect to version 1.2.16 of the commercial server. The server says it supports protocol version 1.4 and that that is incompatible with protocol version 1.5. Is that actually true? The complete output from "ssh -v xxxxxxx" is: $ ./ssh -v xxxxxxx SSH Version OpenSSH_2.3.0p1, protocol versions 1.5/2.0. Compiled with SSL (0x0090581f). debug:
2001 Oct 18
1
Patch for SSH-tunneling via HTTPS-proxy
...his nice patch was brought to you by Leif Jakob <openssh at jakob.weite-welt.com>, don't blame me + * if someone is abusing your misconfigured proxies :) but some broken firewalls require this feature + */ +void +https_proxy_handshake(const char *connect_string) +{ + int connection_out = packet_get_connection_out(); + +#define PROXY1 "CONNECT " +#define PROXY3 " HTTP/1.0\r\n\r\n" + + if (atomicio(write, connection_out, PROXY1, sizeof(PROXY1)-1) != sizeof(PROXY1)-1) + fatal("write proxy1: %.100s", strerror(errno)); + + if (atomicio(write, connection_out, (void *)connect_str...
1999 Dec 06
1
Ugly patch to openssh-1.2pre15
...fore getting + the SSH-%d.%d identification string */ + #define FIREWALL_CHATTER_LINES 10 + /* Session id for the current session. */ unsigned char session_id[16]; *************** *** 896,902 **** --- 902,910 ---- int connection_in = packet_get_connection_in(); int connection_out = packet_get_connection_out(); extern Options options; + int chatter; + for (chatter = 0; chatter < FIREWALL_CHATTER_LINES; chatter++) { /* Read other side\'s version identification. */ for (i = 0; i < sizeof(buf) - 1; i++) { if (read(connection_in, &buf[i],...
2001 Sep 28
1
[PATCH] fix for Linux hang on exit bug in 2.9.9p2
...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.h openssh-2.9.9p2J/channels.h --- openssh-2.9.9p2/ch...
2007 Mar 14
1
sshd gets stuck: select() in packet_read_seqnr waits indefinitely
Dear OpenSSH Portable sshd developers, I'm having a problem where sshd login sessions are occasionally (as often as once a day) getting stuck indefinitely. I enabled debug messages and got a backtrace of a stuck sshd, and I think I've found the bug. I wanted to run it by the list once before filing. sshd version: OpenSSH_4.2p1 FreeBSD-20050903, OpenSSL 0.9.7e-p1 25 Oct 2004
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
...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.h Thu Oct 11 19:35:06 2001 +++ openssh-3.0p1J/channe...
2002 Jan 26
7
[PATCH] Added NoDelay config option and nodelay subsystem option
...d[i]; + if (strcmp(subsys, options.subsystem[i].name) == 0) { + cmd = options.subsystem[i].command; if (stat(cmd, &st) < 0) { error("subsystem: cannot stat %s: %s", cmd, strerror(errno)); break; } + if (options.subsystem[i].nodelay) { + int sock = packet_get_connection_out(), on = 1; + if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, + (void *)&on, sizeof(on)) < 0) + error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); + } debug("subsystem: exec() %s", cmd); s->is_subsystem = 1; do_exec(s, cmd); diff -ru opens...
2000 Jan 19
3
AIX openssh patches
...if ((ip = getprotobyname("ip")) != NULL) *************** *** 149,155 **** --- 159,169 ---- peer_connection_is_on_socket() { struct sockaddr_in from; + #ifdef _AIX + unsigned long fromlen; + #else int fromlen; + #endif int in = packet_get_connection_in(); int out = packet_get_connection_out(); *************** *** 197,203 **** get_remote_ipaddr() { struct sockaddr_in from; ! int fromlen, socket; /* Check whether we have chached the name. */ if (canonical_host_ip != NULL) --- 211,222 ---- get_remote_ipaddr() { struct sockaddr_in from; ! #ifdef _AIX ! unsigned...
2018 Dec 10
2
[PATCH] cleanup of global variables server/client_version_string in sshconnect.c
In sshconnect.c there are two global variables for server_version_string client_version_string. These are used just in a few functions and can easily be passed as parameters. Also, there is a strange construct, where their memory is allocated to the global pointers, then copies of these pointers are assigned to the kex structure. The kex_free finally frees them via cleanup of the kex
2010 Jan 14
1
ssh(1) multiplexing rewrite
...; case 'C': - if (c && c->ctl_fd != -1) + if (c && c->ctl_chan != -1) goto noescape; process_cmdline(); continue; @@ -1315,8 +1313,6 @@ client_loop(int have_pty, int escape_cha connection_in = packet_get_connection_in(); connection_out = packet_get_connection_out(); max_fd = MAX(connection_in, connection_out); - if (muxserver_sock != -1) - max_fd = MAX(max_fd, muxserver_sock); if (!compat20) { /* enable nonblocking unless tty */ @@ -1434,12 +1430,6 @@ client_loop(int have_pty, int escape_cha /* Buffer input from the connection. */ client_pr...