mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4-auth: Use msDS-User-Account-Control-Computed for PW expiry check
This centralises the check rather than checking the time in multiple spots. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
This commit is contained in:
parent
737f241406
commit
b664392208
@ -260,7 +260,7 @@ _PUBLIC_ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
/* check for expired password (but not if this is a password change request) */
|
||||
if ((must_change_time < now) && !password_change) {
|
||||
if ((acct_flags & ACB_PW_EXPIRED) && !password_change) {
|
||||
DEBUG(2,("sam_account_ok: Account for user '%s' password expired!.\n",
|
||||
name_for_logs));
|
||||
DEBUG(2,("sam_account_ok: Password expired at '%s' unix time.\n",
|
||||
|
Loading…
Reference in New Issue
Block a user