diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-07-16 13:26:45 +0300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-07-19 17:33:33 +1000 |
commit | a11d3b4dfbdddb16d3f132ea8fe0175cb7d09444 (patch) | |
tree | 6037e9f8b10ed7c40ef78c74d3907eaf5b4464c6 /source4/dsdb/schema | |
parent | 65b967a706bb4ee2da1d4211c31c91d31a81e8f1 (diff) | |
download | samba-a11d3b4dfbdddb16d3f132ea8fe0175cb7d09444.tar.gz samba-a11d3b4dfbdddb16d3f132ea8fe0175cb7d09444.tar.bz2 samba-a11d3b4dfbdddb16d3f132ea8fe0175cb7d09444.zip |
s4-dsdb: use ldb_msg_difference() in source4/dsdb/schema/schema_set.c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r-- | source4/dsdb/schema/schema_set.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 5d63670621..54fe1c521d 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -137,7 +137,11 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem /* Annoyingly added to our search results */ ldb_msg_remove_attr(res->msgs[0], "distinguishedName"); - mod_msg = ldb_msg_diff(ldb, res->msgs[0], msg); + ret = ldb_msg_difference(ldb, mem_ctx, + res->msgs[0], msg, &mod_msg); + if (ret != LDB_SUCCESS) { + goto op_error; + } if (mod_msg->num_elements > 0) { ret = dsdb_replace(ldb, mod_msg, 0); } @@ -167,7 +171,11 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem /* Annoyingly added to our search results */ ldb_msg_remove_attr(res_idx->msgs[0], "distinguishedName"); - mod_msg = ldb_msg_diff(ldb, res_idx->msgs[0], msg_idx); + ret = ldb_msg_difference(ldb, mem_ctx, + res_idx->msgs[0], msg_idx, &mod_msg); + if (ret != LDB_SUCCESS) { + goto op_error; + } if (mod_msg->num_elements > 0) { ret = dsdb_replace(ldb, mod_msg, 0); } |