summaryrefslogtreecommitdiff
path: root/source3/lib/ldb/tools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-21 15:18:05 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-21 15:18:05 +0100
commit47951fc5d0085e124666b7667715bba98076820e (patch)
tree67216ad0d594eb5a7238327c386ba34594142118 /source3/lib/ldb/tools
parentd3199276eac8caa55c8334458d156fd4badae338 (diff)
downloadsamba-47951fc5d0085e124666b7667715bba98076820e.tar.gz
samba-47951fc5d0085e124666b7667715bba98076820e.tar.bz2
samba-47951fc5d0085e124666b7667715bba98076820e.zip
Reorder arguments to ldb_search() to match what is in Samba 4.
Diffstat (limited to 'source3/lib/ldb/tools')
-rw-r--r--source3/lib/ldb/tools/ad2oLschema.c17
-rw-r--r--source3/lib/ldb/tools/ldbdel.c2
-rw-r--r--source3/lib/ldb/tools/ldbedit.c2
-rw-r--r--source3/lib/ldb/tools/ldbtest.c4
4 files changed, 11 insertions, 14 deletions
diff --git a/source3/lib/ldb/tools/ad2oLschema.c b/source3/lib/ldb/tools/ad2oLschema.c
index fc51cb12d8..55406b29be 100644
--- a/source3/lib/ldb/tools/ad2oLschema.c
+++ b/source3/lib/ldb/tools/ad2oLschema.c
@@ -84,9 +84,8 @@ static int fetch_attrs_schema(struct ldb_context *ldb, struct ldb_dn *schemadn,
}
/* Downlaod schema */
- ret = ldb_search(ldb, schemadn, LDB_SCOPE_SUBTREE,
- "objectClass=attributeSchema",
- attrs, attrs_res);
+ ret = ldb_search(ldb, ldb, attrs_res, schemadn, LDB_SCOPE_SUBTREE,
+ attrs, "objectClass=attributeSchema");
if (ret != LDB_SUCCESS) {
printf("Search failed: %s\n", ldb_errstring(ldb));
return LDB_ERR_OPERATIONS_ERROR;
@@ -122,9 +121,8 @@ static int fetch_oc_recursive(struct ldb_context *ldb, struct ldb_dn *schemadn,
char *filter = talloc_asprintf(mem_ctx, "(&(&(objectClass=classSchema)(subClassOf=%s))(!(lDAPDisplayName=%s)))",
name, name);
- ret = ldb_search(ldb, schemadn, LDB_SCOPE_SUBTREE,
- filter,
- oc_attrs, &res);
+ ret = ldb_search(ldb, ldb, &res, schemadn, LDB_SCOPE_SUBTREE,
+ oc_attrs, filter);
talloc_free(filter);
if (ret != LDB_SUCCESS) {
printf("Search failed: %s\n", ldb_errstring(ldb));
@@ -165,9 +163,8 @@ static int fetch_objectclass_schema(struct ldb_context *ldb, struct ldb_dn *sche
}
/* Downlaod 'top' */
- ret = ldb_search(ldb, schemadn, LDB_SCOPE_SUBTREE,
- "(&(objectClass=classSchema)(lDAPDisplayName=top))",
- oc_attrs, &top_res);
+ ret = ldb_search(ldb, ldb, &top_res, schemadn, LDB_SCOPE_SUBTREE,
+ oc_attrs, "(&(objectClass=classSchema)(lDAPDisplayName=top))");
if (ret != LDB_SUCCESS) {
printf("Search failed: %s\n", ldb_errstring(ldb));
return LDB_ERR_OPERATIONS_ERROR;
@@ -207,7 +204,7 @@ static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ct
}
/* Search for rootdse */
- ldb_ret = ldb_search(ldb, basedn, LDB_SCOPE_BASE, NULL, rootdse_attrs, &rootdse_res);
+ ldb_ret = ldb_search(ldb, ldb, &rootdse_res, basedn, LDB_SCOPE_BASE, rootdse_attrs, NULL);
if (ldb_ret != LDB_SUCCESS) {
printf("Search failed: %s\n", ldb_errstring(ldb));
return NULL;
diff --git a/source3/lib/ldb/tools/ldbdel.c b/source3/lib/ldb/tools/ldbdel.c
index a6d32f422f..cafe0bd352 100644
--- a/source3/lib/ldb/tools/ldbdel.c
+++ b/source3/lib/ldb/tools/ldbdel.c
@@ -41,7 +41,7 @@ static int ldb_delete_recursive(struct ldb_context *ldb, const struct ldb_dn *dn
const char *attrs[] = { NULL };
struct ldb_result *res;
- ret = ldb_search(ldb, dn, LDB_SCOPE_SUBTREE, "distinguishedName=*", attrs, &res);
+ ret = ldb_search(ldb, ldb, &res, dn, LDB_SCOPE_SUBTREE, attrs, "distinguishedName=*");
if (ret != LDB_SUCCESS) return -1;
for (i = 0; i < res->count; i++) {
diff --git a/source3/lib/ldb/tools/ldbedit.c b/source3/lib/ldb/tools/ldbedit.c
index 0e1fd38e4c..dff7270e5d 100644
--- a/source3/lib/ldb/tools/ldbedit.c
+++ b/source3/lib/ldb/tools/ldbedit.c
@@ -306,7 +306,7 @@ int main(int argc, const char **argv)
}
}
- ret = ldb_search(ldb, basedn, options->scope, expression, attrs, &result);
+ ret = ldb_search(ldb, ldb, &result, basedn, options->scope, attrs, expression);
if (ret != LDB_SUCCESS) {
printf("search failed - %s\n", ldb_errstring(ldb));
exit(1);
diff --git a/source3/lib/ldb/tools/ldbtest.c b/source3/lib/ldb/tools/ldbtest.c
index b7fa874ad3..637eb5a7ff 100644
--- a/source3/lib/ldb/tools/ldbtest.c
+++ b/source3/lib/ldb/tools/ldbtest.c
@@ -225,7 +225,7 @@ static void search_uid(struct ldb_context *ldb, struct ldb_dn *basedn, int nreco
int ret;
expr = talloc_asprintf(ldb, "(uid=TEST%d)", uid);
- ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res);
+ ret = ldb_search(ldb, ldb, &res, basedn, LDB_SCOPE_SUBTREE, NULL, expr);
if (ret != LDB_SUCCESS || (uid < nrecords && res->count != 1)) {
printf("Failed to find %s - %s\n", expr, ldb_errstring(ldb));
@@ -345,7 +345,7 @@ static void start_test_index(struct ldb_context **ldb)
exit(1);
}
- ret = ldb_search(*ldb, basedn, LDB_SCOPE_SUBTREE, "uid=test", NULL, &res);
+ ret = ldb_search(*ldb, *ldb, basedn, LDB_SCOPE_SUBTREE, NULL, "uid=test");
if (ret != LDB_SUCCESS) {
printf("Search with (uid=test) filter failed!\n");
exit(1);