mirror of
https://github.com/samba-team/samba.git
synced 2025-11-29 16:23:52 +03:00
r19058: Implement "user cannot change password", and complete "user must change
password at next logon" code. The "password last set time" of zero now means "user must change password", because that's how windows seems to use it. The "can change" and "must change" times are now calculated based on the "last set" time and policies. We use the "can change" field now to indicate that a user cannot change a password by putting MAX_TIME_T in it (so long as "last set" time isn't zero). Based on this, we set the password-can-change bit in the faked secdesc.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
ec526e1b88
commit
21abbeaee9
@@ -623,7 +623,7 @@ NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (!pdb_set_pass_changed_now(sampass)) {
|
||||
if (!pdb_set_pass_last_set_time(sampass, time(NULL), PDB_CHANGED)) {
|
||||
TALLOC_FREE(sampass);
|
||||
/* Not quite sure what this one qualifies as, but this will do */
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
|
||||
Reference in New Issue
Block a user