diff options
author | Damien Miller <djm@mindrot.org> | 2002-09-27 13:25:58 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-09-27 13:25:58 +1000 |
commit | d94e549ea8c622c8a75023b649a5d4c051aacf7f (patch) | |
tree | 84b39347f655ba0e33b7a9b6c3d23011a5befdad /auth1.c | |
parent | d27a76de65d557e36420046e44a014d3190f89cb (diff) |
- markus@cvs.openbsd.org 2002/09/26 11:38:43
[auth1.c auth.h auth-krb4.c monitor.c monitor.h monitor_wrap.c]
[monitor_wrap.h]
krb4 + privsep; ok dugsong@, deraadt@
Diffstat (limited to 'auth1.c')
-rw-r--r-- | auth1.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "includes.h" | 12 | #include "includes.h" |
13 | RCSID("$OpenBSD: auth1.c,v 1.43 2002/09/09 06:48:06 itojun Exp $"); | 13 | RCSID("$OpenBSD: auth1.c,v 1.44 2002/09/26 11:38:43 markus Exp $"); |
14 | 14 | ||
15 | #include "xmalloc.h" | 15 | #include "xmalloc.h" |
16 | #include "rsa.h" | 16 | #include "rsa.h" |
@@ -118,17 +118,24 @@ do_authloop(Authctxt *authctxt) | |||
118 | 118 | ||
119 | if (kdata[0] == 4) { /* KRB_PROT_VERSION */ | 119 | if (kdata[0] == 4) { /* KRB_PROT_VERSION */ |
120 | #ifdef KRB4 | 120 | #ifdef KRB4 |
121 | KTEXT_ST tkt; | 121 | KTEXT_ST tkt, reply; |
122 | |||
123 | tkt.length = dlen; | 122 | tkt.length = dlen; |
124 | if (tkt.length < MAX_KTXT_LEN) | 123 | if (tkt.length < MAX_KTXT_LEN) |
125 | memcpy(tkt.dat, kdata, tkt.length); | 124 | memcpy(tkt.dat, kdata, tkt.length); |
126 | 125 | ||
127 | if (auth_krb4(authctxt, &tkt, &client_user)) { | 126 | if (PRIVSEP(auth_krb4(authctxt, &tkt, |
127 | &client_user, &reply))) { | ||
128 | authenticated = 1; | 128 | authenticated = 1; |
129 | snprintf(info, sizeof(info), | 129 | snprintf(info, sizeof(info), |
130 | " tktuser %.100s", | 130 | " tktuser %.100s", |
131 | client_user); | 131 | client_user); |
132 | |||
133 | packet_start( | ||
134 | SSH_SMSG_AUTH_KERBEROS_RESPONSE); | ||
135 | packet_put_string((char *) | ||
136 | reply.dat, reply.length); | ||
137 | packet_send(); | ||
138 | packet_write_wait(); | ||
132 | } | 139 | } |
133 | #endif /* KRB4 */ | 140 | #endif /* KRB4 */ |
134 | } else { | 141 | } else { |