From 508527890adc7bedd47522a7dae0c96d2b2e4bae Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 23 Sep 2008 14:30:06 -0400 Subject: Merge ldb_search() and ldb_search_exp_fmt() into a simgle function. The previous ldb_search() interface made it way too easy to leak results, and being able to use a printf-like expression turns to be really useful. --- source4/lib/util/util_ldb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/lib/util/util_ldb.c') diff --git a/source4/lib/util/util_ldb.c b/source4/lib/util/util_ldb.c index fab729c036..0465022edd 100644 --- a/source4/lib/util/util_ldb.c +++ b/source4/lib/util/util_ldb.c @@ -52,7 +52,8 @@ int gendb_search_v(struct ldb_context *ldb, res = NULL; - ret = ldb_search(ldb, basedn, scope, expr, attrs, &res); + ret = ldb_search(ldb, mem_ctx, &res, basedn, scope, attrs, + expr?"%s":NULL, expr); if (ret == LDB_SUCCESS) { talloc_steal(mem_ctx, res->msgs); -- cgit