version 1.22, 2001/03/20 18:57:04 |
version 1.22.2.2, 2002/03/09 00:20:43 |
|
|
RCSID("$OpenBSD$"); |
RCSID("$OpenBSD$"); |
|
|
#include "packet.h" |
#include "packet.h" |
#include "xmalloc.h" |
|
#include "log.h" |
#include "log.h" |
#include "servconf.h" |
#include "servconf.h" |
#include "auth.h" |
#include "auth.h" |
|
|
return 0; |
return 0; |
if (*password == '\0' && options.permit_empty_passwd == 0) |
if (*password == '\0' && options.permit_empty_passwd == 0) |
return 0; |
return 0; |
#ifdef BSD_AUTH |
#ifdef KRB5 |
if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", |
if (options.kerberos_authentication == 1) { |
(char *)password) == 0) |
int ret = auth_krb5_password(authctxt, password); |
return 0; |
if (ret == 1 || ret == 0) |
else |
return ret; |
return 1; |
/* Fall back to ordinary passwd authentication. */ |
|
} |
#endif |
#endif |
|
|
#ifdef KRB4 |
#ifdef KRB4 |
if (options.kerberos_authentication == 1) { |
if (options.kerberos_authentication == 1) { |
int ret = auth_krb4_password(pw, password); |
int ret = auth_krb4_password(authctxt, password); |
if (ret == 1 || ret == 0) |
if (ret == 1 || ret == 0) |
return ret; |
return ret; |
/* Fall back to ordinary passwd authentication. */ |
/* Fall back to ordinary passwd authentication. */ |
} |
} |
#endif |
#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. */ |
/* Check for users with no password. */ |
if (strcmp(password, "") == 0 && strcmp(pw->pw_passwd, "") == 0) |
if (strcmp(password, "") == 0 && strcmp(pw->pw_passwd, "") == 0) |
return 1; |
return 1; |