diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-03-18 09:55:03 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-03-18 09:55:03 +0000 |
commit | ae1f160d56b2d59d406f1af34cbdcc88a9e1b914 (patch) | |
tree | 7ac239d263df7247abaf6488a321dac17f2ebce9 /crypto/openssh/auth-passwd.c | |
parent | 1e8db6e2f63ea90b361b3bbc9ebe9990660cb596 (diff) | |
download | src-ae1f160d56b2d59d406f1af34cbdcc88a9e1b914.tar.gz src-ae1f160d56b2d59d406f1af34cbdcc88a9e1b914.zip |
Vendor import of OpenSSH 3.1
Notes
Notes:
svn path=/vendor-crypto/openssh/dist/; revision=92555
Diffstat (limited to 'crypto/openssh/auth-passwd.c')
-rw-r--r-- | crypto/openssh/auth-passwd.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/crypto/openssh/auth-passwd.c b/crypto/openssh/auth-passwd.c index d97e7d928b31..915991f435f1 100644 --- a/crypto/openssh/auth-passwd.c +++ b/crypto/openssh/auth-passwd.c @@ -36,10 +36,9 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-passwd.c,v 1.22 2001/03/20 18:57:04 markus Exp $"); +RCSID("$OpenBSD: auth-passwd.c,v 1.24 2002/03/04 12:43:06 markus Exp $"); #include "packet.h" -#include "xmalloc.h" #include "log.h" #include "servconf.h" #include "auth.h" @@ -64,23 +63,29 @@ auth_password(Authctxt *authctxt, const char *password) return 0; if (*password == '\0' && options.permit_empty_passwd == 0) return 0; -#ifdef BSD_AUTH - if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", - (char *)password) == 0) - return 0; - else - return 1; +#ifdef KRB5 + if (options.kerberos_authentication == 1) { + int ret = auth_krb5_password(authctxt, password); + if (ret == 1 || ret == 0) + return ret; + /* Fall back to ordinary passwd authentication. */ + } #endif - #ifdef KRB4 if (options.kerberos_authentication == 1) { - int ret = auth_krb4_password(pw, password); + int ret = auth_krb4_password(authctxt, password); if (ret == 1 || ret == 0) return ret; /* Fall back to ordinary passwd authentication. */ } #endif - +#ifdef BSD_AUTH + if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", + (char *)password) == 0) + return 0; + else + return 1; +#endif /* Check for users with no password. */ if (strcmp(password, "") == 0 && strcmp(pw->pw_passwd, "") == 0) return 1; |