diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-15 00:42:02 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-15 00:42:02 +0000 |
commit | e7b08259428230e65dcbcc9029e16ec68d0fd7b0 (patch) | |
tree | c2411b60a134f2a16f7c51575fee72b494ddea20 /usr.bin/ssh/auth-krb4.c | |
parent | 649bfbb5c639f8010a8192be1bffc693a9fafabb (diff) |
disconnect if getpeername() fails
Diffstat (limited to 'usr.bin/ssh/auth-krb4.c')
-rw-r--r-- | usr.bin/ssh/auth-krb4.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/auth-krb4.c b/usr.bin/ssh/auth-krb4.c index 7fbc061c38e..adca6018fcb 100644 --- a/usr.bin/ssh/auth-krb4.c +++ b/usr.bin/ssh/auth-krb4.c @@ -6,7 +6,7 @@ Kerberos v4 authentication and ticket-passing routines. - $Id: auth-krb4.c,v 1.7 1999/11/14 22:58:44 markus Exp $ + $Id: auth-krb4.c,v 1.8 1999/11/15 00:42:00 markus Exp $ */ #include "includes.h" @@ -89,8 +89,10 @@ int auth_krb4(const char *server_user, KTEXT auth, char **client) debug("getsockname failed: %.100s", strerror(errno)); r = sizeof(foreign); memset(&foreign, 0, sizeof(foreign)); - if (getpeername(s, (struct sockaddr *)&foreign, &r) < 0) + if (getpeername(s, (struct sockaddr *)&foreign, &r) < 0) { debug("getpeername failed: %.100s", strerror(errno)); + fatal_cleanup(); + } instance[0] = '*'; instance[1] = 0; |