summaryrefslogtreecommitdiff
path: root/source4/lib/ldb-samba/samba_extensions.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-02 10:41:28 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-03 07:43:57 +1100
commit4a08b2d172c144f831b8c6a282ab990142b9b13d (patch)
tree976fe4d5413d75d08e7185e4c4ce38812596ac13 /source4/lib/ldb-samba/samba_extensions.c
parent8a2142773f3be50734a1ae51898e18dcaa26db28 (diff)
downloadsamba-4a08b2d172c144f831b8c6a282ab990142b9b13d.tar.gz
samba-4a08b2d172c144f831b8c6a282ab990142b9b13d.tar.bz2
samba-4a08b2d172c144f831b8c6a282ab990142b9b13d.zip
s4-dsdb: removed the use of ldb_private.h from s4
this will allow s4 to use a system version of ldb
Diffstat (limited to 'source4/lib/ldb-samba/samba_extensions.c')
-rw-r--r--source4/lib/ldb-samba/samba_extensions.c8
1 files changed, 4 insertions, 4 deletions
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;
}