From 4a08b2d172c144f831b8c6a282ab990142b9b13d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2010 10:41:28 +1100 Subject: s4-dsdb: removed the use of ldb_private.h from s4 this will allow s4 to use a system version of ldb --- source4/lib/ldb-samba/samba_extensions.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb-samba/samba_extensions.c b/source4/lib/ldb-samba/samba_extensions.c index 6eeac0b546..63b0f3df91 100644 --- a/source4/lib/ldb-samba/samba_extensions.c +++ b/source4/lib/ldb-samba/samba_extensions.c @@ -24,7 +24,6 @@ #include "includes.h" #include "ldb_module.h" -#include "ldb_private.h" #include "lib/cmdline/popt_common.h" #include "auth/gensec/gensec.h" #include "auth/auth.h" @@ -62,18 +61,19 @@ static int extensions_hook(struct ldb_context *ldb, enum ldb_module_hook_type t) switch (t) { case LDB_MODULE_HOOK_CMDLINE_OPTIONS: { unsigned len1, len2; + struct poptOption **popt_options = ldb_module_popt_options(ldb); struct poptOption *new_array; - len1 = calculate_popt_array_length(ldb->popt_options); + len1 = calculate_popt_array_length(*popt_options); len2 = calculate_popt_array_length(cmdline_extensions); new_array = talloc_array(NULL, struct poptOption, len1+len2+1); if (NULL == new_array) { return ldb_oom(ldb); } - memcpy(new_array, ldb->popt_options, len1*sizeof(struct poptOption)); + memcpy(new_array, *popt_options, len1*sizeof(struct poptOption)); memcpy(new_array+len1, cmdline_extensions, (1+len2)*sizeof(struct poptOption)); - ldb->popt_options = new_array; + (*popt_options) = new_array; return LDB_SUCCESS; } -- cgit