diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:21:14 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:21:14 +0000 |
commit | ec95ed9b4ca014643a0272f6fa5b24ac9c70d263 (patch) | |
tree | 91a5c1b319337e52f7cc80742eda081f6dbfd6c2 /auth-passwd.c | |
parent | b4c774cf8878d9100fde92ff4e938671c3b0301b (diff) |
- dugsong@cvs.openbsd.org 2001/06/26 16:15:25
[auth1.c auth.h auth-krb4.c auth-passwd.c readconf.c readconf.h
servconf.c servconf.h session.c sshconnect1.c sshd.c]
Kerberos v5 support for SSH1, mostly from Assar Westerlund
<assar@freebsd.org> and Bjorn Gronvall <bg@sics.se>. markus@ ok
Diffstat (limited to 'auth-passwd.c')
-rw-r--r-- | auth-passwd.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index d53a9ea2d..988297cb4 100644 --- a/auth-passwd.c +++ b/auth-passwd.c | |||
@@ -36,7 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include "includes.h" | 38 | #include "includes.h" |
39 | RCSID("$OpenBSD: auth-passwd.c,v 1.22 2001/03/20 18:57:04 markus Exp $"); | 39 | RCSID("$OpenBSD: auth-passwd.c,v 1.23 2001/06/26 16:15:23 dugsong Exp $"); |
40 | 40 | ||
41 | #if !defined(USE_PAM) && !defined(HAVE_OSF_SIA) | 41 | #if !defined(USE_PAM) && !defined(HAVE_OSF_SIA) |
42 | 42 | ||
@@ -128,14 +128,14 @@ auth_password(Authctxt *authctxt, const char *password) | |||
128 | #endif | 128 | #endif |
129 | if (*password == '\0' && options.permit_empty_passwd == 0) | 129 | if (*password == '\0' && options.permit_empty_passwd == 0) |
130 | return 0; | 130 | return 0; |
131 | #ifdef BSD_AUTH | 131 | #ifdef KRB5 |
132 | if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", | 132 | if (options.kerberos_authentication == 1) { |
133 | (char *)password) == 0) | 133 | int ret = auth_krb5_password(authctxt, password); |
134 | return 0; | 134 | if (ret == 1 || ret == 0) |
135 | else | 135 | return ret; |
136 | return 1; | 136 | /* Fall back to ordinary passwd authentication. */ |
137 | } | ||
137 | #endif | 138 | #endif |
138 | |||
139 | #ifdef HAVE_CYGWIN | 139 | #ifdef HAVE_CYGWIN |
140 | if (is_winnt) { | 140 | if (is_winnt) { |
141 | HANDLE hToken = cygwin_logon_user(pw, password); | 141 | HANDLE hToken = cygwin_logon_user(pw, password); |
@@ -146,21 +146,24 @@ auth_password(Authctxt *authctxt, const char *password) | |||
146 | return 1; | 146 | return 1; |
147 | } | 147 | } |
148 | #endif | 148 | #endif |
149 | |||
150 | #ifdef WITH_AIXAUTHENTICATE | 149 | #ifdef WITH_AIXAUTHENTICATE |
151 | return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); | 150 | return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); |
152 | #endif | 151 | #endif |
153 | |||
154 | #ifdef KRB4 | 152 | #ifdef KRB4 |
155 | if (options.kerberos_authentication == 1) { | 153 | if (options.kerberos_authentication == 1) { |
156 | int ret = auth_krb4_password(pw, password); | 154 | int ret = auth_krb4_password(authctxt, password); |
157 | if (ret == 1 || ret == 0) | 155 | if (ret == 1 || ret == 0) |
158 | return ret; | 156 | return ret; |
159 | /* Fall back to ordinary passwd authentication. */ | 157 | /* Fall back to ordinary passwd authentication. */ |
160 | } | 158 | } |
161 | #endif | 159 | #endif |
162 | 160 | #ifdef BSD_AUTH | |
163 | 161 | if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", | |
162 | (char *)password) == 0) | ||
163 | return 0; | ||
164 | else | ||
165 | return 1; | ||
166 | #endif | ||
164 | pw_password = pw->pw_passwd; | 167 | pw_password = pw->pw_passwd; |
165 | 168 | ||
166 | /* | 169 | /* |