summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-07-16 14:01:49 +0300
committerAndrew Bartlett <abartlet@samba.org>2010-07-19 17:33:34 +1000
commit2ad701911e2bd5d4cdc5d5db64449f3cc01df3cd (patch)
tree331fac00d236b5a5cb89dc1f027eb0701c542b70 /source4/lib
parent86cc914717a915808479126a14baa915450b24f6 (diff)
downloadsamba-2ad701911e2bd5d4cdc5d5db64449f3cc01df3cd.tar.gz
samba-2ad701911e2bd5d4cdc5d5db64449f3cc01df3cd.tar.bz2
samba-2ad701911e2bd5d4cdc5d5db64449f3cc01df3cd.zip
s4-dsdb: use ldb_msg_normalize() in source4/lib/ldb/common/ldb.c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/common/ldb.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 877f283491..3a0ca464a4 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -795,15 +795,17 @@ int ldb_request(struct ldb_context *ldb, struct ldb_request *req)
ret = module->ops->search(module, req);
break;
case LDB_ADD:
- /* we have to canonicalise here, as so many places
+ /*
+ * we have to normalize here, as so many places
* in modules and backends assume we don't have two
- * elements with the same name */
- req->op.add.message = ldb_msg_canonicalize(ldb, req->op.add.message);
- if (!req->op.add.message) {
+ * elements with the same name
+ */
+ ret = ldb_msg_normalize(ldb, req, req->op.add.message,
+ discard_const(&req->op.add.message));
+ if (ret != LDB_SUCCESS) {
ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
}
- talloc_steal(req, req->op.add.message);
FIRST_OP(ldb, add);
ret = module->ops->add(module, req);
break;