comparison svr-authpasswd.c @ 801:7dcb46da72d9 ecc

merge in HEAD
author Matt Johnston <matt@ucc.asn.au>
date Tue, 21 May 2013 12:09:35 +0800
parents 7bd88d546627
children a625f9e135a4
comparison
equal deleted inserted replaced
799:c344607b7341 801:7dcb46da72d9
64 /* the first bytes of passwdcrypt are the salt */ 64 /* the first bytes of passwdcrypt are the salt */
65 testcrypt = crypt((char*)password, passwdcrypt); 65 testcrypt = crypt((char*)password, passwdcrypt);
66 m_burn(password, passwordlen); 66 m_burn(password, passwordlen);
67 m_free(password); 67 m_free(password);
68 68
69 if (testcrypt == NULL) {
70 /* crypt() with an invalid salt like "!!" */
71 dropbear_log(LOG_WARNING, "User account '%s' is locked",
72 ses.authstate.pw_name);
73 send_msg_userauth_failure(0, 1);
74 return;
75 }
76
69 /* check for empty password */ 77 /* check for empty password */
70 if (passwdcrypt[0] == '\0') { 78 if (passwdcrypt[0] == '\0') {
71 dropbear_log(LOG_WARNING, "User '%s' has blank password, rejected", 79 dropbear_log(LOG_WARNING, "User '%s' has blank password, rejected",
72 ses.authstate.pw_name); 80 ses.authstate.pw_name);
73 send_msg_userauth_failure(0, 1); 81 send_msg_userauth_failure(0, 1);