summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/auth-passwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/auth-passwd.c')
-rw-r--r--crypto/openssh/auth-passwd.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/crypto/openssh/auth-passwd.c b/crypto/openssh/auth-passwd.c
index 1ca7fa9..ab7447f 100644
--- a/crypto/openssh/auth-passwd.c
+++ b/crypto/openssh/auth-passwd.c
@@ -36,11 +36,10 @@
*/
#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 $");
RCSID("$FreeBSD$");
#include "packet.h"
-#include "xmalloc.h"
#include "log.h"
#include "servconf.h"
#include "auth.h"
@@ -65,30 +64,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;
-#endif
#ifdef KRB5
if (options.kerberos_authentication == 1) {
- if (auth_krb5_password(pw, password))
- return 1;
+ int ret = auth_krb5_password(authctxt, password);
+ if (ret == 1 || ret == 0)
+ return ret;
/* Fall back to ordinary passwd authentication. */
}
-
-#endif /* KRB5 */
+#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;
OpenPOWER on IntegriCloud