#include "includes.h"#include "xmalloc.h"#include "packet.h"#include "log.h"#include "auth.h"#include "monitor_wrap.h"#include "servconf.h"Go to the source code of this file.
Functions | |
| RCSID ("$OpenBSD: auth2-passwd.c,v 1.5 2003/12/31 00:24:50 dtucker Exp $") | |
| static int | userauth_passwd (Authctxt *authctxt) |
Variables | |
| ServerOptions | options |
| Authmethod | method_passwd |
|
||||||||||||
|
|
|
|
Definition at line 39 of file auth2-passwd.c. References auth_password(), logit(), packet_check_eom, packet_get_char(), packet_get_string(), PRIVSEP, Authctxt::pw, and xfree(). 00040 { 00041 char *password, *newpass; 00042 int authenticated = 0; 00043 int change; 00044 u_int len, newlen; 00045 00046 change = packet_get_char(); 00047 password = packet_get_string(&len); 00048 if (change) { 00049 /* discard new password from packet */ 00050 newpass = packet_get_string(&newlen); 00051 memset(newpass, 0, newlen); 00052 xfree(newpass); 00053 } 00054 packet_check_eom(); 00055 00056 if (change) 00057 logit("password change not supported"); 00058 else if (PRIVSEP(auth_password(authctxt, password)) == 1) 00059 authenticated = 1; 00060 #ifdef HAVE_CYGWIN 00061 if (check_nt_auth(1, authctxt->pw) == 0) 00062 authenticated = 0; 00063 #endif 00064 memset(password, 0, len); 00065 xfree(password); 00066 return authenticated; 00067 }
|
|
|
Initial value: {
"password",
userauth_passwd,
&options.password_authentication
}
Definition at line 69 of file auth2-passwd.c. |
|
|
|