1
0
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:
Matthias Dieter Wallnöfer 2009-12-03 10:48:44 +01:00 committed by Matthias Dieter Wallnöfer
parent 6e8098b261
commit 029351571a

View File

@ -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);