- markus@cvs.openbsd.org 2005/06/16 08:00:00
[canohost.c channels.c sshd.c] don't exit if getpeername fails for forwarded ports; bugzilla #1054; ok djm
This commit is contained in:
parent
17e7ed0e75
commit
677257fe07
|
@ -4,7 +4,10 @@
|
|||
[channels.c channels.h clientloop.c clientloop.h ssh.c]
|
||||
move x11_get_proto from ssh.c to clientloop.c, to make muliplexed xfwd
|
||||
easier later; ok deraadt@
|
||||
|
||||
- markus@cvs.openbsd.org 2005/06/16 08:00:00
|
||||
[canohost.c channels.c sshd.c]
|
||||
don't exit if getpeername fails for forwarded ports; bugzilla #1054;
|
||||
ok djm
|
||||
|
||||
20050616
|
||||
- (djm) OpenBSD CVS Sync
|
||||
|
@ -2722,4 +2725,4 @@
|
|||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||
|
||||
$Id: ChangeLog,v 1.3821 2005/06/17 02:54:33 djm Exp $
|
||||
$Id: ChangeLog,v 1.3822 2005/06/17 02:55:03 djm Exp $
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: canohost.c,v 1.42 2005/02/18 03:05:53 djm Exp $");
|
||||
RCSID("$OpenBSD: canohost.c,v 1.43 2005/06/16 08:00:00 markus Exp $");
|
||||
|
||||
#include "packet.h"
|
||||
#include "xmalloc.h"
|
||||
|
@ -346,7 +346,7 @@ get_sock_port(int sock, int local)
|
|||
} else {
|
||||
if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) {
|
||||
debug("getpeername failed: %.100s", strerror(errno));
|
||||
cleanup_exit(255);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: channels.c,v 1.215 2005/06/16 03:38:36 djm Exp $");
|
||||
RCSID("$OpenBSD: channels.c,v 1.216 2005/06/16 08:00:00 markus Exp $");
|
||||
|
||||
#include "ssh.h"
|
||||
#include "ssh1.h"
|
||||
|
@ -1178,7 +1178,7 @@ port_open_helper(Channel *c, char *rtype)
|
|||
int direct;
|
||||
char buf[1024];
|
||||
char *remote_ipaddr = get_peer_ipaddr(c->sock);
|
||||
u_short remote_port = get_peer_port(c->sock);
|
||||
int remote_port = get_peer_port(c->sock);
|
||||
|
||||
direct = (strcmp(rtype, "direct-tcpip") == 0);
|
||||
|
||||
|
@ -1208,7 +1208,7 @@ port_open_helper(Channel *c, char *rtype)
|
|||
}
|
||||
/* originator host and port */
|
||||
packet_put_cstring(remote_ipaddr);
|
||||
packet_put_int(remote_port);
|
||||
packet_put_int((u_int)remote_port);
|
||||
packet_send();
|
||||
} else {
|
||||
packet_start(SSH_MSG_PORT_OPEN);
|
||||
|
|
7
sshd.c
7
sshd.c
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: sshd.c,v 1.309 2005/04/06 09:43:59 djm Exp $");
|
||||
RCSID("$OpenBSD: sshd.c,v 1.310 2005/06/16 08:00:00 markus Exp $");
|
||||
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/bn.h>
|
||||
|
@ -1626,7 +1626,10 @@ main(int ac, char **av)
|
|||
setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0)
|
||||
error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
|
||||
|
||||
remote_port = get_remote_port();
|
||||
if ((remote_port = get_remote_port()) < 0) {
|
||||
debug("get_remote_port failed");
|
||||
cleanup_exit(255);
|
||||
}
|
||||
remote_ip = get_remote_ipaddr();
|
||||
|
||||
#ifdef SSH_AUDIT_EVENTS
|
||||
|
|
Loading…
Reference in New Issue