summaryrefslogtreecommitdiff
path: root/source4/dsdb/common/util.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-12-17 19:41:11 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-12-17 20:00:19 +0100
commitbbec305135cae9cb6ad95d2de1617e93b18d5659 (patch)
treea34990e7a1d1527d7387c9983f3e44f409a906b3 /source4/dsdb/common/util.c
parentdc4c41124228878d2c29fe2b240b23eb49631fe1 (diff)
downloadsamba-bbec305135cae9cb6ad95d2de1617e93b18d5659.tar.gz
samba-bbec305135cae9cb6ad95d2de1617e93b18d5659.tar.bz2
samba-bbec305135cae9cb6ad95d2de1617e93b18d5659.zip
s4:"samdb_set_password" - remove delete instructions
They won't work when the LDB change is done using "samdb_replace" (consider "samr_password.c" functions). I think this has been a relict which has been useful before the "password_hash" module existed. Basically it itself does now the updates.
Diffstat (limited to 'source4/dsdb/common/util.c')
-rw-r--r--source4/dsdb/common/util.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 9de41cd6ee..8ba734c159 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1863,20 +1863,15 @@ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
* hashes */
CHECK_RET(ldb_msg_add_value(mod, "clearTextPassword", new_password, NULL));
} else {
- /* We don't have the cleartext, so delete the old one
- * and set what we have of the hashes */
- CHECK_RET(samdb_msg_add_delete(ctx, mem_ctx, mod, "clearTextPassword"));
+ /* we don't have the cleartext, so set what we have of the
+ * hashes */
if (lmNewHash) {
CHECK_RET(samdb_msg_add_hash(ctx, mem_ctx, mod, "dBCSPwd", lmNewHash));
- } else {
- CHECK_RET(samdb_msg_add_delete(ctx, mem_ctx, mod, "dBCSPwd"));
}
if (ntNewHash) {
CHECK_RET(samdb_msg_add_hash(ctx, mem_ctx, mod, "unicodePwd", ntNewHash));
- } else {
- CHECK_RET(samdb_msg_add_delete(ctx, mem_ctx, mod, "unicodePwd"));
}
}