summaryrefslogtreecommitdiff
path: root/source4/lib/util/util_ldb.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-09-23 14:30:06 -0400
committerSimo Sorce <idra@samba.org>2008-09-23 18:17:46 -0400
commit508527890adc7bedd47522a7dae0c96d2b2e4bae (patch)
tree77e510421ff8eb98c0a9b0836905ca2f67eaf42f /source4/lib/util/util_ldb.c
parentd275cc762dad1985045d381ca211e92234d9d77d (diff)
downloadsamba-508527890adc7bedd47522a7dae0c96d2b2e4bae.tar.gz
samba-508527890adc7bedd47522a7dae0c96d2b2e4bae.tar.bz2
samba-508527890adc7bedd47522a7dae0c96d2b2e4bae.zip
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.
Diffstat (limited to 'source4/lib/util/util_ldb.c')
-rw-r--r--source4/lib/util/util_ldb.c3
1 files changed, 2 insertions, 1 deletions
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);