summaryrefslogtreecommitdiffhomepage
path: root/svr-authpasswd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-05-21 12:09:35 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-05-21 12:09:35 +0800
commit04518e9e801ee57bd6d4caab470da8dc0ec98fd7 (patch)
tree5e46adedc7cd70e6f7b0547a200544cbcf80b96b /svr-authpasswd.c
parent41f531ceafc86507c82847f44f9c9e126d798c48 (diff)
parenta57947c513a53e77de0b2eaa67ca6404f444a29f (diff)
merge in HEAD
--HG-- branch : ecc
Diffstat (limited to 'svr-authpasswd.c')
-rw-r--r--svr-authpasswd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/svr-authpasswd.c b/svr-authpasswd.c
index 38fccc2..17dd2a1 100644
--- a/svr-authpasswd.c
+++ b/svr-authpasswd.c
@@ -66,6 +66,14 @@ void svr_auth_password() {
m_burn(password, passwordlen);
m_free(password);
+ if (testcrypt == NULL) {
+ /* crypt() with an invalid salt like "!!" */
+ dropbear_log(LOG_WARNING, "User account '%s' is locked",
+ ses.authstate.pw_name);
+ send_msg_userauth_failure(0, 1);
+ return;
+ }
+
/* check for empty password */
if (passwdcrypt[0] == '\0') {
dropbear_log(LOG_WARNING, "User '%s' has blank password, rejected",