git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
35a3455
)
s4-dsdb: use ldb_msg_diff_ex() in source4/dsdb/schema/schema_set.c
author
Kamen Mazdrashki
<kamenim@samba.org>
Fri, 9 Jul 2010 02:10:00 +0000
(
05:10
+0300)
committer
Kamen Mazdrashki
<kamenim@samba.org>
Sat, 10 Jul 2010 20:03:12 +0000
(23:03 +0300)
source4/dsdb/schema/schema_set.c
patch
|
blob
|
history
diff --git
a/source4/dsdb/schema/schema_set.c
b/source4/dsdb/schema/schema_set.c
index 5d636706212e9ef790d7f6e143cfa30397547b2a..e786c7d20f68d67e56cbb3d23c6701a11ab32029 100644
(file)
--- a/
source4/dsdb/schema/schema_set.c
+++ b/
source4/dsdb/schema/schema_set.c
@@
-137,7
+137,10
@@
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");
/* 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_diff_ex(ldb, res->msgs[0], msg, mem_ctx, &mod_msg);
+ if (ret != LDB_SUCCESS) {
+ goto op_error;
+ }
if (mod_msg->num_elements > 0) {
ret = dsdb_replace(ldb, mod_msg, 0);
}
if (mod_msg->num_elements > 0) {
ret = dsdb_replace(ldb, mod_msg, 0);
}
@@
-167,7
+170,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");
/* 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_diff_ex(ldb, res_idx->msgs[0], msg_idx,
+ mem_ctx, &mod_msg);
+ if (ret != LDB_SUCCESS) {
+ goto op_error;
+ }
if (mod_msg->num_elements > 0) {
ret = dsdb_replace(ldb, mod_msg, 0);
}
if (mod_msg->num_elements > 0) {
ret = dsdb_replace(ldb, mod_msg, 0);
}