mirror of
https://github.com/samba-team/samba.git
synced 2025-01-29 21:47:30 +03:00
s4:dsdb/password_hash: only set pwdLastSet if required
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9654 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
786ee29d4f
commit
cad741c714
@ -2251,12 +2251,14 @@ static int update_final_msg(struct setup_password_fields_io *io)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
ret = samdb_msg_add_uint64(ldb, io->ac,
|
||||
io->ac->update_msg,
|
||||
"pwdLastSet",
|
||||
io->g.last_set);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
if (io->ac->update_lastset) {
|
||||
ret = samdb_msg_add_uint64(ldb, io->ac,
|
||||
io->ac->update_msg,
|
||||
"pwdLastSet",
|
||||
io->g.last_set);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return LDB_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user