diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-01-20 15:15:19 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-01-20 15:15:19 +0000 |
commit | 1a6245a16972faf3875e62e984fd20ff9c4e9758 (patch) | |
tree | e1a72e1c610844a50a1a472a048c2f54f13c04d2 /usr.bin | |
parent | ea2db320a961d65b84361d9c4e03be702fe36a33 (diff) |
use getpeername() in packet_connection_is_on_socket(), fixes sshd -i;
from Holger.Trapp@Informatik.TU-Chemnitz.DE
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index ec31cba57d3..7f7f888c2e7 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -15,7 +15,7 @@ */ #include "includes.h" -RCSID("$Id: packet.c,v 1.19 2000/01/04 00:07:59 markus Exp $"); +RCSID("$Id: packet.c,v 1.20 2000/01/20 15:15:18 markus 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; |