summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-02-16 19:48:46 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-02-21 21:43:48 +0100
commit461987bc26c89253f5ee71e3c374d4b0db79c84b (patch)
tree9900b98f621824b43cd58c4c9946b05eb5a1957b /source4/dsdb/samdb/ldb_modules
parenteca8697d6181f1b7c1261393de72411227680065 (diff)
downloadsamba-461987bc26c89253f5ee71e3c374d4b0db79c84b.tar.gz
samba-461987bc26c89253f5ee71e3c374d4b0db79c84b.tar.bz2
samba-461987bc26c89253f5ee71e3c374d4b0db79c84b.zip
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.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c14
1 files changed, 7 insertions, 7 deletions
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;
}