From 2ccf661cbe0924a1549a74b5a4f970e90f94d6a9 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 15 Nov 1999 15:25:10 +1100 Subject: - Merged more OpenBSD CVS changes: [auth-krb4.c] - disconnect if getpeername() fails - missing xfree(*client) [canohost.c] - disconnect if getpeername() fails - fix comment: we _do_ disconnect if ip-options are set [sshd.c] - disconnect if getpeername() fails - move checking of remote port to central place [auth-rhosts.c] move checking of remote port to central place [log-server.c] avoid extra fd per sshd, from millert@ [readconf.c] print _all_ bad config-options in ssh(1), too [readconf.h] print _all_ bad config-options in ssh(1), too [ssh.c] print _all_ bad config-options in ssh(1), too [sshconnect.c] disconnect if getpeername() fails - OpenBSD's changes to sshd.c broke the PAM stuff, re-merged it. --- auth-krb4.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'auth-krb4.c') diff --git a/auth-krb4.c b/auth-krb4.c index 032052338..72acd47db 100644 --- a/auth-krb4.c +++ b/auth-krb4.c @@ -6,7 +6,7 @@ Kerberos v4 authentication and ticket-passing routines. - $Id: auth-krb4.c,v 1.3 1999/11/11 06:57:39 damien Exp $ + $Id: auth-krb4.c,v 1.4 1999/11/15 04:25:10 damien 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; @@ -110,6 +112,7 @@ int auth_krb4(const char *server_user, KTEXT auth, char **client) packet_send_debug("Kerberos V4 .klogin authorization failed!"); log("Kerberos V4 .klogin authorization failed for %s to account %s", *client, server_user); + xfree(*client); return 0; } /* Increment the checksum, and return it encrypted with the session key. */ -- cgit v1.2.3