search for: sock_out

Displaying 20 results from an estimated 25 matches for "sock_out".

2018 Dec 03
3
[PATCH] removing an old API.
...ming(const char *buf, u_int len); diff --git a/sshd.c b/sshd.c index 2795a2e..65b96d4 100755 --- a/sshd.c +++ b/sshd.c @@ -1906,9 +1906,12 @@ main(int ac, char **av) * Register our connection. This turns encryption off because we do * not have a key. */ - packet_set_connection(sock_in, sock_out); + if ((ssh = ssh_alloc_session_state()) == NULL) + fatal("Couldn't allocate session state"); + active_state = ssh; /* XXX legacy API compat */ + if (ssh_packet_set_connection(ssh, sock_in, sock_out) != NULL) + fatal("ssh_packet_set_connection failed"); packet_set_serv...
2003 Jul 10
2
sshd also talking HTTP
....h> #endif +#ifdef DOUBLE_AS_HTTPD +#include <sys/select.h> +#include <sys/time.h> +#include <stdio.h> +#endif #include "ssh.h" #include "ssh1.h" @@ -483,6 +488,152 @@ } } +#ifdef DOUBLE_AS_HTTPD +static void sshd_act_like_an_httpd(int sock_in, int sock_out); +static void sshd_httpd_timeout(int sig); + +/* intercept httpd */ +static void +sshd_intercept_possible_httpd(int sock_in, int sock_out) +{ + struct sockaddr local; + int local_len; + fd_set readfds; + struct timeval onesec; + + local_len = sizeof(local); + if ( getsockname(sock_in, &local,...
2001 Mar 28
0
Problem with tcp_wrappers
Hello, I have just found little bug in OpenSSH's tcp_wrappers handling. In file sshd.c you can find: if (!hosts_access(&req)) { close(sock_in); close(sock_out); refuse(&req); } If username was not requierd for authorization (for example you are refusing all connection from specific host) refuse will return "sshd: refused connect from root at some.host.name". This happend becouse user name is checked b...
2020 Jan 21
3
Instrumentation for metrics
> This makes me think that the syslog approach is probably the way to go Yeah, right. Another idea is to mirror the current preauth load via setproctitle()... That makes that data accessible even without a syscall (at least the writing of the data - quering needs syscalls, right), so that can be kept up-to-date and allows a high monitoring frequency as well. Multiple instances of SSHd (on
2004 Aug 25
6
sshd 3.9p1 under Reliant Unix 5.45: getpeername: Operation not supported on transport endpoint
The following is special to sshd 3.9p1 under ReliantUnix 5.45. It does not occur under ReliantUnix 5.43 nor under Solaris 5.8: `pwd`/sshd-3.9 -e -D -d -d -d Now connecting from outside [...] debug1: inetd sockets after dupping: 3, 3 debug1: get_port() calls get_sock_port(3) debug1: getpeername failed: Operation not supported on transport endpoint lsof proves FD 3 is an established TCP
1999 Jul 02
2
Installation of Samba on SVR3 unix
Hi I have attempted to install Samba on an ageing Motorola running SVR3. Unfortunately it has a limitation of 14 characters for filenames, which means that when I untar the package, many of the files are not created. Does anyone have a solution to this problem, or am I stuck? Many thanks -- Pete ---------------------------------------------------------------- morph@morhp.dircon.co.uk
2002 Jun 25
7
[Bug 294] tcp wrapper access changed between 2.9.9p2 and 3.3p1
http://bugzilla.mindrot.org/show_bug.cgi?id=294 ------- Additional Comments From ktaylor at daac.gsfc.nasa.gov 2002-06-26 00:53 ------- This is what's reported in the syslog from openssh-2.9.9p2 - with an ip address range listed in hosts.allow Jun 25 10:50:08 6D:server sshd[30123536]: Failed keyboard-interactive for ktaylor from xxx.xxx.xxx.xxx port 40333 ssh2 Jun 25 10:50:13 6D:server
1999 Nov 20
1
openssh and DOS
...if ((pid = fork()) == 0) - { - /* Child. Close the listening socket, and start using - the accepted socket. Reinitialize logging (since our - pid has changed). We break out of the loop to handle - the connection. */ - close(listen_sock); - sock_in = newsock; - sock_out = newsock; - log_init(av0, options.log_level, options.log_facility, log_stderr); - break; + /* Make sure we don't have too many connections. */ + if (options.max_connections > 0 + && current_connections >= options.max_connections) + error (&quo...
2008 Sep 15
0
No subject
...onnection in buffer_init in buffer_init in buffer_init in buffer_init ?after packet_set_connection ?before select ?after get_remote_portremote_port=57218 ?after get_remote_ipaddr=192.168.131.254 Connection from 192.168.131.254 port 57218 ?before signal ?before sshd_exchange_identificationsock_in=6, sock_out=6 ?after sshd_exchange_identificationsock_in=6, sock_out=6 ?after packet_set_nonblocking in buffer_init ?after buffer_init ?before use_privsep=0',use_privsep before privsep_preauth in authctxt_new in buffer_init ?authenticate user and start session ?in do_ssh2_kex ?compat_cipher_proposal ?compa...
2020 Jan 21
2
Instrumentation for metrics
...with another change that matches the commit message. Was that intentional? -- Craig Miskell Site Reliability Engineer | GitLab | Dunedin, New Zealand diff --git a/sshd.c b/sshd.c index 6129b0a..debbdcb 100644 --- a/sshd.c +++ b/sshd.c @@ -1005,7 +1005,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) { fd_set *fdset; int i, j, ret, maxfd; - int startups = 0, listening = 0, lameduck = 0; + int ostartups = -1, startups = 0, listening = 0, lameduck = 0; int startup_p[2] = { -1 , -1 }; char c = 0; struct sockaddr_storage from; @@ -1029,6 +1029,11 @@ s...
2008 Sep 18
2
SSHD_PROBLEM
...onnection in buffer_init in buffer_init in buffer_init in buffer_init after packet_set_connection before select after get_remote_portremote_port=57218 after get_remote_ipaddr=192.168.131.254 Connection from 192.168.131.254 port 57218 before signal before sshd_exchange_identificationsock_in=6, sock_out=6 after sshd_exchange_identificationsock_in=6, sock_out=6 after packet_set_nonblocking in buffer_init after buffer_init before use_privsep=0',use_privsep before privsep_preauth in authctxt_new in buffer_init authenticate user and start session in do_ssh2_kex compat_cipher_proposal compa...
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
2003 Oct 08
4
OS/390 openssh
...ex *xxx_kex; @@ -370,6 +371,9 @@ snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION); server_version_string = xstrdup(buf); +#ifdef CHARSET_EBCDIC + __etoa(server_version_string); +#endif /* Send our protocol version identification. */ if (atomicio(vwrite, sock_out, server_version_string, strlen(server_version_string)) @@ -377,6 +381,9 @@ logit("Could not write ident string to %s", get_remote_ipaddr()); fatal_cleanup(); } +#ifdef CHARSET_EBCDIC + __atoe(server_version_string); /* undo the conversion, server_version_string is used below...
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
2000 Jul 17
2
sshd -i problem under 2.1.1p4 as well
I have encountered the same problem with sshd -i (under Mandrake linux 6.1) as that described by Ben L Perkins, this time with 2.1.1p4: ... Last login: Mon Jul 17 12:04:50 2000 from orpheus.qimr.edu.au -bash: ?oe90: command not found -bash: glorious: command not found -bash: ?]r90: command not found -bash: marshall4: command not found Connection to orpheus.qimr.edu.au closed. log: Jul 17
2000 Jul 17
1
logout() returned an error
Hi everybody, I got the following problems, as I tried to connect from ssh (1.2.27) client to openssh (2.1.1p4) server: Client: ------- $ ssh -l user1 192.168.0.2 user1 at 192.168.0.2's password: Last login: Mon Jul 17 11.05.44 2000 from 192.168.0.1 -bash: ?Ptty3: command not found -bash: Zg9tty3: command not found connection to 192.168.0.2 closed. Server: ------- logfile-entries: Jul 17
2003 Sep 10
3
[PATCH] No extern declarations of optarg & co if getopt.h is available
...v retrieving revision 1.260 diff -p -u -r1.260 sshd.c --- sshd.c 2 Sep 2003 12:51:17 -0000 1.260 +++ sshd.c 10 Sep 2003 18:59:02 -0000 @@ -797,8 +797,10 @@ usage(void) int main(int ac, char **av) { +#ifndef HAVE_GETOPT_H extern char *optarg; extern int optind; +#endif int opt, sock_in = 0, sock_out = 0, newsock, j, i, fdsetsz, on = 1; pid_t pid; socklen_t fromlen; -- Corinna Vinschen Cygwin Developer Red Hat, Inc.
2000 Aug 24
0
patch for a few things
...t;); *************** *** 975,980 **** --- 994,1000 ---- remote_port = get_remote_port(); remote_ip = get_remote_ipaddr(); + remote_hostname = get_canonical_hostname(); /* Check whether logins are denied from this host. */ #ifdef LIBWRAP *************** *** 990,1000 **** close(sock_out); refuse(&req); } /*XXX IPv6 verbose("Connection from %.500s port %d", eval_client(&req), remote_port); */ } #endif /* LIBWRAP */ /* Log the connection. */ ! verbose("Connection from %.500s port %d", remote_ip, remote_port); /* * We don\'...
2014 Jun 23
2
ListenAdress Exclusion
I was wondering what everyone's thoughts were on a simpler way to exclude addresses from having listeners on them. I know a lot of people have multiple subnets, especially larger corporations. Some networks are non-route-able, and therefor unsuitable for use with SSH, aside from communication between other servers on the same subnet. Given that we may want to exclude those non-route-able
2002 Dec 18
2
patch for openssh3.5p1 - adds logging option
...ons.log_level, options.log_facility, log_stderr); + log_init(__progname, options.log_level, options.log_facility, log_stderr, options.log_file); /* Initialize the random number generator. */ arc4random_stir(); @@ -1352,7 +1352,7 @@ close_listen_socks(); sock_in = newsock; sock_out = newsock; - log_init(__progname, options.log_level, options.log_facility, log_stderr); + log_init(__progname, options.log_level, options.log_facility, log_stderr, options.log_file); break; } }