summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-12-03 10:48:44 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-10 19:12:26 +0200
commit029351571a5bd65a467ff9e7844a7a1ef3d688a0 (patch)
treeefef7243faf6fafa5ed07ae6fbc6e6e51cfadd59 /source4/dsdb
parent6e8098b261b9357204c8fa5534871a4c137ca1c5 (diff)
downloadsamba-029351571a5bd65a467ff9e7844a7a1ef3d688a0.tar.gz
samba-029351571a5bd65a467ff9e7844a7a1ef3d688a0.tar.bz2
samba-029351571a5bd65a467ff9e7844a7a1ef3d688a0.zip
s4:samdb_set_password - adapt it for the user password change handling
Make use of the new "change old password checked" control.
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index a63c4204cc..5deb1d08b1 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -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);