summaryrefslogtreecommitdiff
path: root/auth-krb4.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-15 15:25:10 +1100
committerDamien Miller <djm@mindrot.org>1999-11-15 15:25:10 +1100
commit2ccf661cbe0924a1549a74b5a4f970e90f94d6a9 (patch)
tree8bb7ea3cbe9d473e7f46b7084f563cc593cc5d47 /auth-krb4.c
parentcedfecc99e73f9661d4dc3cea8c88e57c6e0b487 (diff)
- 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.
Diffstat (limited to 'auth-krb4.c')
-rw-r--r--auth-krb4.c7
1 files changed, 5 insertions, 2 deletions
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 @@
6 6
7 Kerberos v4 authentication and ticket-passing routines. 7 Kerberos v4 authentication and ticket-passing routines.
8 8
9 $Id: auth-krb4.c,v 1.3 1999/11/11 06:57:39 damien Exp $ 9 $Id: auth-krb4.c,v 1.4 1999/11/15 04:25:10 damien Exp $
10*/ 10*/
11 11
12#include "includes.h" 12#include "includes.h"
@@ -89,8 +89,10 @@ int auth_krb4(const char *server_user, KTEXT auth, char **client)
89 debug("getsockname failed: %.100s", strerror(errno)); 89 debug("getsockname failed: %.100s", strerror(errno));
90 r = sizeof(foreign); 90 r = sizeof(foreign);
91 memset(&foreign, 0, sizeof(foreign)); 91 memset(&foreign, 0, sizeof(foreign));
92 if (getpeername(s, (struct sockaddr *)&foreign, &r) < 0) 92 if (getpeername(s, (struct sockaddr *)&foreign, &r) < 0) {
93 debug("getpeername failed: %.100s", strerror(errno)); 93 debug("getpeername failed: %.100s", strerror(errno));
94 fatal_cleanup();
95 }
94 96
95 instance[0] = '*'; instance[1] = 0; 97 instance[0] = '*'; instance[1] = 0;
96 98
@@ -110,6 +112,7 @@ int auth_krb4(const char *server_user, KTEXT auth, char **client)
110 packet_send_debug("Kerberos V4 .klogin authorization failed!"); 112 packet_send_debug("Kerberos V4 .klogin authorization failed!");
111 log("Kerberos V4 .klogin authorization failed for %s to account %s", 113 log("Kerberos V4 .klogin authorization failed for %s to account %s",
112 *client, server_user); 114 *client, server_user);
115 xfree(*client);
113 return 0; 116 return 0;
114 } 117 }
115 /* Increment the checksum, and return it encrypted with the session key. */ 118 /* Increment the checksum, and return it encrypted with the session key. */