From 461987bc26c89253f5ee71e3c374d4b0db79c84b Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Tue, 16 Feb 2010 19:48:46 +0100 Subject: s4:password_hash - Fix up request message pointers For add requests we need the add request messages, for modify requests we need the modify request messages. --- source4/dsdb/samdb/ldb_modules/password_hash.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index cd588211da..3cefa184e5 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -1689,10 +1689,10 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req) /* If no part of this ADD touches the userPassword, or the NT * or LM hashes, then we don't need to make any changes. */ - sambaAttr = ldb_msg_find_element(req->op.mod.message, "userPassword"); - clearTextPasswordAttr = ldb_msg_find_element(req->op.mod.message, "clearTextPassword"); - ntAttr = ldb_msg_find_element(req->op.mod.message, "unicodePwd"); - lmAttr = ldb_msg_find_element(req->op.mod.message, "dBCSPwd"); + sambaAttr = ldb_msg_find_element(req->op.add.message, "userPassword"); + clearTextPasswordAttr = ldb_msg_find_element(req->op.add.message, "clearTextPassword"); + ntAttr = ldb_msg_find_element(req->op.add.message, "unicodePwd"); + lmAttr = ldb_msg_find_element(req->op.add.message, "dBCSPwd"); if ((!sambaAttr) && (!clearTextPasswordAttr) && (!ntAttr) && (!lmAttr)) { return ldb_next_request(module, req); @@ -1884,13 +1884,13 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r } /* nobody must touch password Histories */ - if (ldb_msg_find_element(req->op.add.message, "ntPwdHistory")) { + if (ldb_msg_find_element(req->op.mod.message, "ntPwdHistory")) { return LDB_ERR_UNWILLING_TO_PERFORM; } - if (ldb_msg_find_element(req->op.add.message, "lmPwdHistory")) { + if (ldb_msg_find_element(req->op.mod.message, "lmPwdHistory")) { return LDB_ERR_UNWILLING_TO_PERFORM; } - if (ldb_msg_find_element(req->op.add.message, "supplementalCredentials")) { + if (ldb_msg_find_element(req->op.mod.message, "supplementalCredentials")) { return LDB_ERR_UNWILLING_TO_PERFORM; } -- cgit