version 1.21, 2001/02/12 16:16:23 |
version 1.22, 2001/03/20 18:57:04 |
|
|
#include "servconf.h" |
#include "servconf.h" |
#include "auth.h" |
#include "auth.h" |
|
|
|
|
|
extern ServerOptions options; |
|
|
/* |
/* |
* Tries to authenticate the user using password. Returns true if |
* Tries to authenticate the user using password. Returns true if |
* authentication succeeds. |
* authentication succeeds. |
*/ |
*/ |
int |
int |
auth_password(struct passwd * pw, const char *password) |
auth_password(Authctxt *authctxt, const char *password) |
{ |
{ |
extern ServerOptions options; |
struct passwd * pw = authctxt->pw; |
char *encrypted_password; |
char *encrypted_password; |
|
|
/* deny if no user. */ |
/* deny if no user. */ |
|
|
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 |
|
if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", |
|
(char *)password) == 0) |
|
return 0; |
|
else |
|
return 1; |
|
#endif |
|
|
#ifdef KRB4 |
#ifdef KRB4 |
if (options.kerberos_authentication == 1) { |
if (options.kerberos_authentication == 1) { |