diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-21 16:15:53 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-21 16:15:53 +0100 |
commit | f3ecb701335b1129947127d4c45eef970b66875c (patch) | |
tree | 4e670492610ad24817f6717bf1a9762df22cd7f5 /source3/lib/ldb/tools/ldbtest.c | |
parent | 47951fc5d0085e124666b7667715bba98076820e (diff) | |
download | samba-f3ecb701335b1129947127d4c45eef970b66875c.tar.gz samba-f3ecb701335b1129947127d4c45eef970b66875c.tar.bz2 samba-f3ecb701335b1129947127d4c45eef970b66875c.zip |
Replace ldb_search() with ldb_search_exp_fmt(), like in Samba 4.
Diffstat (limited to 'source3/lib/ldb/tools/ldbtest.c')
-rw-r--r-- | source3/lib/ldb/tools/ldbtest.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/lib/ldb/tools/ldbtest.c b/source3/lib/ldb/tools/ldbtest.c index 637eb5a7ff..5e8ef1b21c 100644 --- a/source3/lib/ldb/tools/ldbtest.c +++ b/source3/lib/ldb/tools/ldbtest.c @@ -220,20 +220,18 @@ static void search_uid(struct ldb_context *ldb, struct ldb_dn *basedn, int nreco for (i=0;i<nsearches;i++) { int uid = (i * 700 + 17) % (nrecords * 2); - char *expr; struct ldb_result *res = NULL; int ret; - expr = talloc_asprintf(ldb, "(uid=TEST%d)", uid); - ret = ldb_search(ldb, ldb, &res, basedn, LDB_SCOPE_SUBTREE, NULL, expr); + ret = ldb_search(ldb, ldb, &res, basedn, LDB_SCOPE_SUBTREE, NULL, "(uid=TEST%d)", uid); if (ret != LDB_SUCCESS || (uid < nrecords && res->count != 1)) { - printf("Failed to find %s - %s\n", expr, ldb_errstring(ldb)); + printf("Failed to find TEST%d - %s\n", uid, ldb_errstring(ldb)); exit(1); } if (uid >= nrecords && res->count > 0) { - printf("Found %s !? - %d\n", expr, ret); + printf("Found TEST%d !? - %d\n", uid, ret); exit(1); } |