mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s4-dsdb: use ldb_msg_difference() in source4/dsdb/schema/schema_set.c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
65b967a706
commit
a11d3b4dfb
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user