diff options
author | Simo Sorce <idra@samba.org> | 2010-07-19 13:48:31 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-07-19 13:48:31 -0400 |
commit | f9f3358348229b14d368316e327cfd2a4cb48c7c (patch) | |
tree | 9fb61c2ed61dd1ff93a64fc4498a4ec8d3a0607d /source4/lib/ldb/common/ldb.c | |
parent | 7e4de49bfceed18c81abf93703a61d0a22617a24 (diff) | |
parent | 630a2eb68af0d523a1bb4451bbaa75d2ba47d252 (diff) | |
download | samba-f9f3358348229b14d368316e327cfd2a4cb48c7c.tar.gz samba-f9f3358348229b14d368316e327cfd2a4cb48c7c.tar.bz2 samba-f9f3358348229b14d368316e327cfd2a4cb48c7c.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 12 |
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; |