diff options
author | assar <assar@FreeBSD.org> | 2001-06-16 07:44:17 +0000 |
---|---|---|
committer | assar <assar@FreeBSD.org> | 2001-06-16 07:44:17 +0000 |
commit | 116337ea171d96880b44a09b714494a22d9ca738 (patch) | |
tree | 4a838936655ef6921c88eb0d794741261d83de93 | |
parent | 61020736f6ac17745f77df9457b9e5e2a64c8866 (diff) | |
download | FreeBSD-src-116337ea171d96880b44a09b714494a22d9ca738.zip FreeBSD-src-116337ea171d96880b44a09b714494a22d9ca738.tar.gz |
(do_authloop): handle !KRB4 && KRB5
-rw-r--r-- | crypto/openssh/auth1.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crypto/openssh/auth1.c b/crypto/openssh/auth1.c index d5d15ef..d5eb4d8 100644 --- a/crypto/openssh/auth1.c +++ b/crypto/openssh/auth1.c @@ -190,15 +190,18 @@ do_authloop(Authctxt *authctxt) break; } else { /* Try Kerberos authentication. */ - KTEXT_ST auth; + u_int len; char *tkt_user = NULL; - char *kdata = packet_get_string((u_int *) &auth.length); - packet_integrity_check(plen, 4 + auth.length, type); + char *kdata = packet_get_string(&len); + packet_integrity_check(plen, 4 + len, type); if (!authctxt->valid) { /* Do nothing. */ } else if (kdata[0] == 4) { /* 4 == KRB_PROT_VERSION */ #ifdef KRB4 + KTEXT_ST auth; + + auth.length = len; if (auth.length < MAX_KTXT_LEN) memcpy(auth.dat, kdata, auth.length); authenticated = auth_krb4(pw->pw_name, &auth, &tkt_user); @@ -216,7 +219,7 @@ do_authloop(Authctxt *authctxt) verbose("Kerberos v5 authentication disabled."); #else krb5_data k5data; - k5data.length = auth.length; + k5data.length = len; k5data.data = kdata; #if 0 if (krb5_init_context(&ssh_context)) { |