comparison svr-authpasswd.c @ 70:b0316ce64e4b

Merging in the changes from 0.41-0.43 main Dropbear tree
author Matt Johnston <matt@ucc.asn.au>
date Thu, 12 Aug 2004 16:41:58 +0000
parents eee77ac31ccc
children 3394a7cb30cd
comparison
equal deleted inserted replaced
69:59d16db56e9f 70:b0316ce64e4b
35 /* Process a password auth request, sending success or failure messages as 35 /* Process a password auth request, sending success or failure messages as
36 * appropriate */ 36 * appropriate */
37 void svr_auth_password() { 37 void svr_auth_password() {
38 38
39 #ifdef HAVE_SHADOW_H 39 #ifdef HAVE_SHADOW_H
40 struct spwd *spasswd; 40 struct spwd *spasswd = NULL;
41 #endif 41 #endif
42 char * passwdcrypt; /* the crypt from /etc/passwd or /etc/shadow */ 42 char * passwdcrypt = NULL; /* the crypt from /etc/passwd or /etc/shadow */
43 char * testcrypt; /* crypt generated from the user's password sent */ 43 char * testcrypt = NULL; /* crypt generated from the user's password sent */
44 unsigned char * password; 44 unsigned char * password;
45 unsigned int passwordlen; 45 unsigned int passwordlen;
46 46
47 unsigned char changepw; 47 unsigned int changepw;
48 48
49 passwdcrypt = ses.authstate.pw->pw_passwd; 49 passwdcrypt = ses.authstate.pw->pw_passwd;
50 #ifdef HAVE_SHADOW_H 50 #ifdef HAVE_SHADOW_H
51 /* get the shadow password if possible */ 51 /* get the shadow password if possible */
52 spasswd = getspnam(ses.authstate.printableuser); 52 spasswd = getspnam(ses.authstate.printableuser);