summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-11 17:41:38 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-11 17:41:38 +0200
commitc0a863b6f35315a748fa3bb4ae4e4e7c48ad2102 (patch)
treea03797ac414c71c685247b8650d84b189c245c93 /source4/torture
parentea3f21dff6c28dc26a3cf9223da84ff4c545b22c (diff)
downloadsamba-c0a863b6f35315a748fa3bb4ae4e4e7c48ad2102.tar.gz
s4:ldb_register_samba_handlers - fix up and convert result codes to LDB/LDAP results
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/drs/rpc/dssync.c2
-rw-r--r--source4/torture/ldb/ldb.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/drs/rpc/dssync.c b/source4/torture/drs/rpc/dssync.c
index c7b67081cb1..aaae85be3d8 100644
--- a/source4/torture/drs/rpc/dssync.c
+++ b/source4/torture/drs/rpc/dssync.c
@@ -265,7 +265,7 @@ static bool test_LDAPBind(struct torture_context *tctx, struct DsSyncTest *ctx,
/* Despite us loading the schema from the AD server, we need
* the samba handlers to get the extended DN syntax stuff */
ret = ldb_register_samba_handlers(ldb);
- if (ret == -1) {
+ if (ret != LDB_SUCCESS) {
talloc_free(ldb);
return NULL;
}
diff --git a/source4/torture/ldb/ldb.c b/source4/torture/ldb/ldb.c
index 8bc6357e3dc..8a5a3f309ed 100644
--- a/source4/torture/ldb/ldb.c
+++ b/source4/torture/ldb/ldb.c
@@ -57,7 +57,7 @@ static bool torture_ldb_attrs(struct torture_context *torture)
"Failed to init ldb");
torture_assert_int_equal(torture,
- ldb_register_samba_handlers(ldb), 0,
+ ldb_register_samba_handlers(ldb), LDB_SUCCESS,
"Failed to register Samba handlers");
ldb_set_utf8_fns(ldb, NULL, wrap_casefold);
@@ -216,7 +216,7 @@ static bool torture_ldb_dn_attrs(struct torture_context *torture)
"Failed to init ldb");
torture_assert_int_equal(torture,
- ldb_register_samba_handlers(ldb), 0,
+ ldb_register_samba_handlers(ldb), LDB_SUCCESS,
"Failed to register Samba handlers");
ldb_set_utf8_fns(ldb, NULL, wrap_casefold);
@@ -334,7 +334,7 @@ static bool torture_ldb_dn_extended(struct torture_context *torture)
"Failed to init ldb");
torture_assert_int_equal(torture,
- ldb_register_samba_handlers(ldb), 0,
+ ldb_register_samba_handlers(ldb), LDB_SUCCESS,
"Failed to register Samba handlers");
ldb_set_utf8_fns(ldb, NULL, wrap_casefold);
@@ -595,7 +595,7 @@ static bool torture_ldb_dn(struct torture_context *torture)
"Failed to init ldb");
torture_assert_int_equal(torture,
- ldb_register_samba_handlers(ldb), 0,
+ ldb_register_samba_handlers(ldb), LDB_SUCCESS,
"Failed to register Samba handlers");
ldb_set_utf8_fns(ldb, NULL, wrap_casefold);
@@ -707,7 +707,7 @@ static bool torture_ldb_dn_invalid_extended(struct torture_context *torture)
"Failed to init ldb");
torture_assert_int_equal(torture,
- ldb_register_samba_handlers(ldb), 0,
+ ldb_register_samba_handlers(ldb), LDB_SUCCESS,
"Failed to register Samba handlers");
ldb_set_utf8_fns(ldb, NULL, wrap_casefold);