mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
s4:samdb_set_password - adapt it for the user password change handling
Make use of the new "change old password checked" control.
This commit is contained in:
parent
6e8098b261
commit
029351571a
@ -1994,6 +1994,18 @@ NTSTATUS samdb_set_password(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (user_change) {
|
||||
/* a user password change and we've checked already the old
|
||||
* password somewhere else (callers responsability) */
|
||||
ret = ldb_request_add_control(req,
|
||||
DSDB_CONTROL_PASSWORD_CHANGE_OLD_PW_CHECKED_OID,
|
||||
true, NULL);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(req);
|
||||
talloc_free(msg);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
}
|
||||
ret = ldb_request_add_control(req,
|
||||
DSDB_CONTROL_PASSWORD_HASH_VALUES_OID,
|
||||
true, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user