summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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",