summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-18 20:55:23 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-21 23:41:05 +1100
commite89a2db4f24ee70c45e0636e9baa8b6212a27cde (patch)
tree5a7b578694c2914b58e5b85db74dd91a3f328503 /source4/dsdb/samdb/ldb_modules
parent2c88ffb8f1f3691d29a88ab263dde5b07f4f400a (diff)
downloadsamba-e89a2db4f24ee70c45e0636e9baa8b6212a27cde.tar.gz
samba-e89a2db4f24ee70c45e0636e9baa8b6212a27cde.tar.bz2
samba-e89a2db4f24ee70c45e0636e9baa8b6212a27cde.zip
s4-dsdb: use varargs expression in dsdb_module_search()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/util.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c
index 8d9930a81f..acc1c01959 100644
--- a/source4/dsdb/samdb/ldb_modules/util.c
+++ b/source4/dsdb/samdb/ldb_modules/util.c
@@ -164,15 +164,21 @@ int dsdb_module_search(struct ldb_module *module,
struct ldb_dn *basedn, enum ldb_scope scope,
const char * const *attrs,
int dsdb_flags,
- const char *expression)
+ const char *format, ...) _PRINTF_ATTRIBUTE(8, 9)
{
int ret;
struct ldb_request *req;
TALLOC_CTX *tmp_ctx;
struct ldb_result *res;
+ va_list ap;
+ char *expression;
tmp_ctx = talloc_new(mem_ctx);
+ va_start(ap, format);
+ expression = talloc_vasprintf(tmp_ctx, format, ap);
+ va_end(ap);
+
res = talloc_zero(tmp_ctx, struct ldb_result);
if (!res) {
return LDB_ERR_OPERATIONS_ERROR;