summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-07-16 13:38:09 +0300
committerAndrew Bartlett <abartlet@samba.org>2010-07-19 17:33:33 +1000
commit148b8588bc7864f4771c8dcf21cfdc150b22e701 (patch)
tree18d02f702339e35e4ae14740b681626f5a6307b5 /source4
parentfa0db46af16080dd3a540072f7ad664c0b9270ca (diff)
downloadsamba-148b8588bc7864f4771c8dcf21cfdc150b22e701.tar.gz
samba-148b8588bc7864f4771c8dcf21cfdc150b22e701.tar.bz2
samba-148b8588bc7864f4771c8dcf21cfdc150b22e701.zip
s4-test: Use ldb_msg_difference() in torture/rpc/dssync.c test
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/dssync.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 5e5929f734..150db42e96 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -575,8 +575,9 @@ static bool test_analyse_objects(struct torture_context *tctx,
}
- new_msg = ldb_msg_diff(ldb, drs_msg, ldap_msg);
- talloc_steal(search_req, new_msg);
+ ret = ldb_msg_difference(ldb, search_req,
+ drs_msg, ldap_msg, &new_msg);
+ torture_assert(tctx, ret == LDB_SUCCESS, "ldb_msg_difference() has failed");
if (new_msg->num_elements != 0) {
char *s;
struct ldb_ldif ldif;
@@ -585,7 +586,9 @@ static bool test_analyse_objects(struct torture_context *tctx,
s = ldb_ldif_write_string(ldb, new_msg, &ldif);
s = talloc_asprintf(tctx, "\n# Difference in between DRS and LDAP objects: \n%s\n", s);
- ldif.msg = ldb_msg_diff(ldb, ldap_msg, drs_msg);
+ ret = ldb_msg_difference(ldb, search_req,
+ ldap_msg, drs_msg, &ldif.msg);
+ torture_assert(tctx, ret == LDB_SUCCESS, "ldb_msg_difference() has failed");
s = talloc_asprintf_append(s,
"\n# Difference in between LDAP and DRS objects: \n%s\n",
ldb_ldif_write_string(ldb, new_msg, &ldif));