diff options
Diffstat (limited to 'auth1.c')
-rw-r--r-- | auth1.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "includes.h" | 12 | #include "includes.h" |
13 | RCSID("$OpenBSD: auth1.c,v 1.26 2001/12/05 03:56:39 itojun Exp $"); | 13 | RCSID("$OpenBSD: auth1.c,v 1.27 2001/12/19 07:18:56 deraadt Exp $"); |
14 | 14 | ||
15 | #include "xmalloc.h" | 15 | #include "xmalloc.h" |
16 | #include "rsa.h" | 16 | #include "rsa.h" |
@@ -77,7 +77,7 @@ do_authloop(Authctxt *authctxt) | |||
77 | struct passwd *pw = authctxt->pw; | 77 | struct passwd *pw = authctxt->pw; |
78 | 78 | ||
79 | debug("Attempting authentication for %s%.100s.", | 79 | debug("Attempting authentication for %s%.100s.", |
80 | authctxt->valid ? "" : "illegal user ", authctxt->user); | 80 | authctxt->valid ? "" : "illegal user ", authctxt->user); |
81 | 81 | ||
82 | /* If the user has no password, accept authentication immediately. */ | 82 | /* If the user has no password, accept authentication immediately. */ |
83 | if (options.password_authentication && | 83 | if (options.password_authentication && |
@@ -120,17 +120,17 @@ do_authloop(Authctxt *authctxt) | |||
120 | verbose("Kerberos authentication disabled."); | 120 | verbose("Kerberos authentication disabled."); |
121 | } else { | 121 | } else { |
122 | char *kdata = packet_get_string(&dlen); | 122 | char *kdata = packet_get_string(&dlen); |
123 | 123 | ||
124 | packet_integrity_check(plen, 4 + dlen, type); | 124 | packet_integrity_check(plen, 4 + dlen, type); |
125 | 125 | ||
126 | if (kdata[0] == 4) { /* KRB_PROT_VERSION */ | 126 | if (kdata[0] == 4) { /* KRB_PROT_VERSION */ |
127 | #ifdef KRB4 | 127 | #ifdef KRB4 |
128 | KTEXT_ST tkt; | 128 | KTEXT_ST tkt; |
129 | 129 | ||
130 | tkt.length = dlen; | 130 | tkt.length = dlen; |
131 | if (tkt.length < MAX_KTXT_LEN) | 131 | if (tkt.length < MAX_KTXT_LEN) |
132 | memcpy(tkt.dat, kdata, tkt.length); | 132 | memcpy(tkt.dat, kdata, tkt.length); |
133 | 133 | ||
134 | if (auth_krb4(authctxt, &tkt, &client_user)) { | 134 | if (auth_krb4(authctxt, &tkt, &client_user)) { |
135 | authenticated = 1; | 135 | authenticated = 1; |
136 | snprintf(info, sizeof(info), | 136 | snprintf(info, sizeof(info), |
@@ -143,7 +143,7 @@ do_authloop(Authctxt *authctxt) | |||
143 | krb5_data tkt; | 143 | krb5_data tkt; |
144 | tkt.length = dlen; | 144 | tkt.length = dlen; |
145 | tkt.data = kdata; | 145 | tkt.data = kdata; |
146 | 146 | ||
147 | if (auth_krb5(authctxt, &tkt, &client_user)) { | 147 | if (auth_krb5(authctxt, &tkt, &client_user)) { |
148 | authenticated = 1; | 148 | authenticated = 1; |
149 | snprintf(info, sizeof(info), | 149 | snprintf(info, sizeof(info), |
@@ -156,7 +156,7 @@ do_authloop(Authctxt *authctxt) | |||
156 | } | 156 | } |
157 | break; | 157 | break; |
158 | #endif /* KRB4 || KRB5 */ | 158 | #endif /* KRB4 || KRB5 */ |
159 | 159 | ||
160 | #if defined(AFS) || defined(KRB5) | 160 | #if defined(AFS) || defined(KRB5) |
161 | /* XXX - punt on backward compatibility here. */ | 161 | /* XXX - punt on backward compatibility here. */ |
162 | case SSH_CMSG_HAVE_KERBEROS_TGT: | 162 | case SSH_CMSG_HAVE_KERBEROS_TGT: |
@@ -168,7 +168,7 @@ do_authloop(Authctxt *authctxt) | |||
168 | break; | 168 | break; |
169 | #endif /* AFS */ | 169 | #endif /* AFS */ |
170 | #endif /* AFS || KRB5 */ | 170 | #endif /* AFS || KRB5 */ |
171 | 171 | ||
172 | case SSH_CMSG_AUTH_RHOSTS: | 172 | case SSH_CMSG_AUTH_RHOSTS: |
173 | if (!options.rhosts_authentication) { | 173 | if (!options.rhosts_authentication) { |
174 | verbose("Rhosts authentication disabled."); | 174 | verbose("Rhosts authentication disabled."); |
@@ -381,7 +381,7 @@ do_authentication(void) | |||
381 | /* XXX - SSH.com Kerberos v5 braindeath. */ | 381 | /* XXX - SSH.com Kerberos v5 braindeath. */ |
382 | if ((p = strchr(user, '@')) != NULL) | 382 | if ((p = strchr(user, '@')) != NULL) |
383 | *p = '\0'; | 383 | *p = '\0'; |
384 | 384 | ||
385 | authctxt = authctxt_new(); | 385 | authctxt = authctxt_new(); |
386 | authctxt->user = user; | 386 | authctxt->user = user; |
387 | authctxt->style = style; | 387 | authctxt->style = style; |