We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4ff2fd commit 22b4fe7Copy full SHA for 22b4fe7
1 file changed
src/session_server_ssh.c
@@ -700,6 +700,9 @@ auth_password_get_pwd_hash(const char *username)
700
if (!spwd) {
701
VRB("Failed to retrieve the shadow entry for \"%s\".", username);
702
return NULL;
703
+ } else if ((spwd->sp_expire > -1) && (spwd->sp_expire <= (time(NULL) / (60 * 60 * 24)))) {
704
+ WRN("User \"%s\" account has expired.", username);
705
+ return NULL;
706
}
707
708
pass_hash = spwd->sp_pwdp;
0 commit comments