summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-01-22 19:47:21 +1100
committerDamien Miller <djm@mindrot.org>2000-01-22 19:47:21 +1100
commitf052aaf9f6ed50de9c91d3fbda72be77a9770624 (patch)
treeb9e219b31e4a6ad52d5182c15af3dd02d61cc081 /packet.c
parent8dbbe6e546020e880cc01b5c6eb68484df766369 (diff)
- OpenBSD CVS updates:
- [packet.c] use getpeername() in packet_connection_is_on_socket(), fixes sshd -i; from Holger.Trapp@Informatik.TU-Chemnitz.DE - [sshd.c] log with level log() not fatal() if peer behaves badly. - [readpass.c] instead of blocking SIGINT, catch it ourselves, so that we can clean the tty modes up and kill ourselves -- instead of our process group leader (scp, cvs, ...) going away and leaving us in noecho mode. people with cbreak shells never even noticed..
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index bcd25834..3202e7e7 100644
--- a/packet.c
+++ b/packet.c
@@ -15,7 +15,7 @@
*/
#include "includes.h"
-RCSID("$Id: packet.c,v 1.9 2000/01/14 04:45:50 damien Exp $");
+RCSID("$Id: packet.c,v 1.10 2000/01/22 08:47:21 damien Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -117,11 +117,11 @@ packet_connection_is_on_socket()
return 1;
fromlen = sizeof(from);
memset(&from, 0, sizeof(from));
- if (getpeername(connection_in, (struct sockaddr *) & from, &fromlen) < 0)
+ if (getpeername(connection_in, (struct sockaddr *)&from, &fromlen) < 0)
return 0;
tolen = sizeof(to);
memset(&to, 0, sizeof(to));
- if (getsockname(connection_out, (struct sockaddr *)&to, &tolen) < 0)
+ if (getpeername(connection_out, (struct sockaddr *)&to, &tolen) < 0)
return 0;
if (fromlen != tolen || memcmp(&from, &to, fromlen) != 0)
return 0;