[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Tue Nov 2 15:29:02 MDT 2010


The branch, master has been updated
       via  b3fb311 s4-ldb: give the user a hint as to what may be wrong
       via  4a08b2d s4-dsdb: removed the use of ldb_private.h from s4
       via  8a21427 s4-ldb: expose some more ldb module functions
      from  0e95fca s3: Add "net registry getvaluesraw"

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b3fb311173ff6716a19a9e828f7167872bf76638
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Nov 2 10:58:49 2010 +1100

    s4-ldb: give the user a hint as to what may be wrong
    
    when a backend or module can't be found, give a hint about
    the LDB_MODULES_PATH environment variable
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Tue Nov  2 21:28:22 UTC 2010 on sn-devel-104

commit 4a08b2d172c144f831b8c6a282ab990142b9b13d
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Nov 2 10:41:28 2010 +1100

    s4-dsdb: removed the use of ldb_private.h from s4
    
    this will allow s4 to use a system version of ldb

commit 8a2142773f3be50734a1ae51898e18dcaa26db28
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Nov 2 10:40:52 2010 +1100

    s4-ldb: expose some more ldb module functions
    
    this exposes enough functions for s4 to not need ldb_private.h any
    more.

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/ldb_modules/dsdb_cache.c        |   48 ----------
 source4/dsdb/samdb/ldb_modules/partition.c         |   72 ++++++++--------
 source4/dsdb/samdb/ldb_modules/partition.h         |    1 -
 source4/dsdb/samdb/ldb_modules/partition_init.c    |   17 ++--
 source4/dsdb/samdb/ldb_modules/samba_dsdb.c        |    8 +-
 source4/dsdb/samdb/ldb_modules/samba_secrets.c     |    8 +-
 source4/dsdb/samdb/ldb_modules/schema.c            |    2 +-
 source4/dsdb/samdb/ldb_modules/util.c              |   10 +--
 source4/dsdb/samdb/ldb_modules/wscript_build       |   10 --
 source4/lib/ldb-samba/samba_extensions.c           |    8 +-
 .../ldb/ABI/{ldb-0.9.18.sigs => ldb-0.9.19.sigs}   |   11 ++-
 source4/lib/ldb/common/ldb.c                       |    2 +-
 source4/lib/ldb/common/ldb_modules.c               |   94 +++++++++++++++++---
 source4/lib/ldb/include/ldb_module.h               |   50 +++++++++++
 source4/lib/ldb/include/ldb_private.h              |    6 --
 source4/lib/ldb/tools/cmdline.c                    |   10 ++-
 source4/lib/ldb/wscript                            |    2 +-
 17 files changed, 207 insertions(+), 152 deletions(-)
 delete mode 100644 source4/dsdb/samdb/ldb_modules/dsdb_cache.c
 copy source4/lib/ldb/ABI/{ldb-0.9.18.sigs => ldb-0.9.19.sigs} (96%)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/dsdb_cache.c b/source4/dsdb/samdb/ldb_modules/dsdb_cache.c
deleted file mode 100644
index b252fff..0000000
--- a/source4/dsdb/samdb/ldb_modules/dsdb_cache.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 
-   Unix SMB/CIFS mplementation.
-
-   The Module that loads some DSDB related things
-   into memory. E.g. it loads the dsdb_schema structure
-   
-   Copyright (C) Stefan Metzmacher 2007
-    
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-   
-*/
-
-#include "includes.h"
-#include "lib/ldb/include/ldb.h"
-#include "lib/ldb/include/ldb_errors.h"
-#include "lib/ldb/include/ldb_private.h"
-#include "dsdb/samdb/samdb.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#include "librpc/gen_ndr/ndr_drsuapi.h"
-#include "librpc/gen_ndr/ndr_drsblobs.h"
-
-static int dsdb_cache_init(struct ldb_module *module)
-{
-	/* TODO: load the schema */
-	return ldb_next_init(module);
-}
-
-static const struct ldb_module_ops ldb_dsdb_cache_module_ops = {
-	.name		= "dsdb_cache",
-	.init_context	= dsdb_cache_init
-};
-
-int ldb_dsdb_cache_module_init(const char *version)
-{
-	LDB_MODULE_CHECK_VERSION(version);
-	return ldb_register_module(&ldb_dsdb_cache_module_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 7732bcf..5163726 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -68,7 +68,7 @@ static struct partition_context *partition_init_ctx(struct ldb_module *module, s
  */
 int partition_request(struct ldb_module *module, struct ldb_request *request)
 {
-	if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) { \
+	if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) { \
 		const struct dsdb_control_current_partition *partition = NULL;
 		struct ldb_control *partition_ctrl = ldb_request_get_control(request, DSDB_CONTROL_CURRENT_PARTITION_OID);
 		if (partition_ctrl) {
@@ -77,10 +77,10 @@ int partition_request(struct ldb_module *module, struct ldb_request *request)
 		}
 
 		if (partition != NULL) {
-			ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_request() -> %s", 
+			ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_request() -> %s",
 				  ldb_dn_get_linearized(partition->dn));			
 		} else {
-			ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_request() -> (metadata partition)");			
+			ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_request() -> (metadata partition)");
 		}
 	}
 
@@ -138,7 +138,7 @@ static int partition_req_callback(struct ldb_request *req,
 	struct ldb_control *partition_ctrl;
 
 	ac = talloc_get_type(req->context, struct partition_context);
-	data = talloc_get_type(ac->module->private_data, struct partition_private_data);
+	data = talloc_get_type(ldb_module_get_private(ac->module), struct partition_private_data);
 
 	if (!ares) {
 		return ldb_module_done(ac->req, NULL, NULL,
@@ -369,7 +369,7 @@ static int partition_send_all(struct ldb_module *module,
 			      struct ldb_request *req) 
 {
 	unsigned int i;
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 	int ret = partition_prep_request(ac, NULL);
 	if (ret != LDB_SUCCESS) {
@@ -396,7 +396,7 @@ static int partition_replicate(struct ldb_module *module, struct ldb_request *re
 	unsigned int i;
 	int ret;
 	struct dsdb_partition *partition;
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 	if (!data || !data->partitions) {
 		return ldb_next_request(module, req);
@@ -454,7 +454,7 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
 {
 	struct ldb_control **saved_controls;
 	/* Find backend */
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 	struct partition_context *ac;
 	struct ldb_context *ldb;
@@ -677,7 +677,7 @@ static int partition_rename(struct ldb_module *module, struct ldb_request *req)
 	/* Find backend */
 	struct dsdb_partition *backend, *backend2;
 	
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 
 	/* Skip the lot if 'data' isn't here yet (initialisation) */
@@ -711,13 +711,13 @@ static int partition_start_trans(struct ldb_module *module)
 {
 	unsigned int i;
 	int ret;
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 	/* Look at base DN */
 	/* Figure out which partition it is under */
 	/* Skip the lot if 'data' isn't here yet (initialization) */
-	if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
-		ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_start_trans() -> (metadata partition)");
+	if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+		ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_start_trans() -> (metadata partition)");
 	}
 	ret = ldb_next_start_trans(module);
 	if (ret != LDB_SUCCESS) {
@@ -730,8 +730,8 @@ static int partition_start_trans(struct ldb_module *module)
 	}
 
 	for (i=0; data && data->partitions && data->partitions[i]; i++) {
-		if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
-			ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_start_trans() -> %s", 
+		if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+			ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_start_trans() -> %s",
 				  ldb_dn_get_linearized(data->partitions[i]->ctrl->dn));
 		}
 		ret = ldb_next_start_trans(data->partitions[i]->module);
@@ -754,27 +754,27 @@ static int partition_start_trans(struct ldb_module *module)
 static int partition_prepare_commit(struct ldb_module *module)
 {
 	unsigned int i;
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 
 	for (i=0; data && data->partitions && data->partitions[i]; i++) {
 		int ret;
 
-		if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
-			ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_prepare_commit() -> %s", 
+		if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+			ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_prepare_commit() -> %s",
 				  ldb_dn_get_linearized(data->partitions[i]->ctrl->dn));
 		}
 		ret = ldb_next_prepare_commit(data->partitions[i]->module);
 		if (ret != LDB_SUCCESS) {
-			ldb_asprintf_errstring(module->ldb, "prepare_commit error on %s: %s",
+			ldb_asprintf_errstring(ldb_module_get_ctx(module), "prepare_commit error on %s: %s",
 					       ldb_dn_get_linearized(data->partitions[i]->ctrl->dn),
-					       ldb_errstring(module->ldb));
+					       ldb_errstring(ldb_module_get_ctx(module)));
 			return ret;
 		}
 	}
 
-	if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
-		ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_prepare_commit() -> (metadata partition)");
+	if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+		ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_prepare_commit() -> (metadata partition)");
 	}
 	return ldb_next_prepare_commit(module);
 }
@@ -785,7 +785,7 @@ static int partition_end_trans(struct ldb_module *module)
 {
 	int ret, ret2;
 	unsigned int i;
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 
 	ret = LDB_SUCCESS;
@@ -798,21 +798,21 @@ static int partition_end_trans(struct ldb_module *module)
 	}
 
 	for (i=0; data && data->partitions && data->partitions[i]; i++) {
-		if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
-			ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_end_trans() -> %s", 
+		if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+			ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_end_trans() -> %s",
 				  ldb_dn_get_linearized(data->partitions[i]->ctrl->dn));
 		}
 		ret2 = ldb_next_end_trans(data->partitions[i]->module);
 		if (ret2 != LDB_SUCCESS) {
-			ldb_asprintf_errstring(module->ldb, "end_trans error on %s: %s",
+			ldb_asprintf_errstring(ldb_module_get_ctx(module), "end_trans error on %s: %s",
 					       ldb_dn_get_linearized(data->partitions[i]->ctrl->dn),
-					       ldb_errstring(module->ldb));
+					       ldb_errstring(ldb_module_get_ctx(module)));
 			ret = ret2;
 		}
 	}
 
-	if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
-		ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_end_trans() -> (metadata partition)");
+	if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+		ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_end_trans() -> (metadata partition)");
 	}
 	ret2 = ldb_next_end_trans(module);
 	if (ret2 != LDB_SUCCESS) {
@@ -826,18 +826,18 @@ static int partition_del_trans(struct ldb_module *module)
 {
 	int ret, final_ret = LDB_SUCCESS;
 	unsigned int i;
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 	for (i=0; data && data->partitions && data->partitions[i]; i++) {
-		if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
-			ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_del_trans() -> %s", 
+		if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+			ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_del_trans() -> %s",
 				  ldb_dn_get_linearized(data->partitions[i]->ctrl->dn));
 		}
 		ret = ldb_next_del_trans(data->partitions[i]->module);
 		if (ret != LDB_SUCCESS) {
-			ldb_asprintf_errstring(module->ldb, "del_trans error on %s: %s",
+			ldb_asprintf_errstring(ldb_module_get_ctx(module), "del_trans error on %s: %s",
 					       ldb_dn_get_linearized(data->partitions[i]->ctrl->dn),
-					       ldb_errstring(module->ldb));
+					       ldb_errstring(ldb_module_get_ctx(module)));
 			final_ret = ret;
 		}
 	}	
@@ -848,8 +848,8 @@ static int partition_del_trans(struct ldb_module *module)
 	}
 	data->in_transaction--;
 
-	if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
-		ldb_debug(module->ldb, LDB_DEBUG_TRACE, "partition_del_trans() -> (metadata partition)");
+	if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+		ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_del_trans() -> (metadata partition)");
 	}
 	ret = ldb_next_del_trans(module);
 	if (ret != LDB_SUCCESS) {
@@ -923,7 +923,7 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque
 	uint64_t seq_number = 0;
 	uint64_t timestamp_sequence = 0;
 	uint64_t timestamp = 0;
-	struct partition_private_data *data = talloc_get_type(module->private_data, 
+	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
 	struct ldb_seqnum_request *seq;
 	struct ldb_seqnum_result *seqr;
@@ -1164,7 +1164,7 @@ static int partition_extended(struct ldb_module *module, struct ldb_request *req
 	struct partition_context *ac;
 	int ret;
 
-	data = talloc_get_type(module->private_data, struct partition_private_data);
+	data = talloc_get_type(ldb_module_get_private(module), struct partition_private_data);
 	if (!data) {
 		return ldb_next_request(module, req);
 	}
diff --git a/source4/dsdb/samdb/ldb_modules/partition.h b/source4/dsdb/samdb/ldb_modules/partition.h
index 594634c..3b67d30 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.h
+++ b/source4/dsdb/samdb/ldb_modules/partition.h
@@ -21,7 +21,6 @@
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
 #include "lib/ldb/include/ldb_module.h"
-#include "lib/ldb/include/ldb_private.h"
 #include "dsdb/samdb/samdb.h"
 #include "dsdb/samdb/ldb_modules/util.h"
 #include "system/locale.h"
diff --git a/source4/dsdb/samdb/ldb_modules/partition_init.c b/source4/dsdb/samdb/ldb_modules/partition_init.c
index 7118fa0..eb67cd3 100644
--- a/source4/dsdb/samdb/ldb_modules/partition_init.c
+++ b/source4/dsdb/samdb/ldb_modules/partition_init.c
@@ -32,6 +32,7 @@
 #include "dsdb/samdb/ldb_modules/partition.h"
 #include "lib/util/tsort.h"
 #include "lib/ldb-samba/ldb_wrap.h"
+#include "system/filesys.h"
 
 static int partition_sort_compare(const void *v1, const void *v2)
 {
@@ -232,7 +233,7 @@ static int new_partition_from_dn(struct ldb_context *ldb, struct partition_priva
 		}
 		(*partition)->backend_url = talloc_steal((*partition), backend_url);
 
-		if (!(ldb->flags & LDB_FLG_RDONLY)) {
+		if (!(ldb_module_flags(ldb) & LDB_FLG_RDONLY)) {
 			char *p;
 			char *backend_dir = talloc_strdup(*partition, backend_url);
 			
@@ -251,7 +252,7 @@ static int new_partition_from_dn(struct ldb_context *ldb, struct partition_priva
 	ctrl->version = DSDB_CONTROL_CURRENT_PARTITION_VERSION;
 	ctrl->dn = talloc_steal(ctrl, dn);
 	
-	ret = ldb_connect_backend(ldb, (*partition)->backend_url, NULL, &backend_module);
+	ret = ldb_module_connect_backend(ldb, (*partition)->backend_url, NULL, &backend_module);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
@@ -264,7 +265,7 @@ static int new_partition_from_dn(struct ldb_context *ldb, struct partition_priva
 		talloc_free(*partition);
 		return LDB_ERR_CONSTRAINT_VIOLATION;
 	}
-	ret = ldb_load_modules_list(ldb, modules, backend_module, &module_chain);
+	ret = ldb_module_load_list(ldb, modules, backend_module, &module_chain);
 	if (ret != LDB_SUCCESS) {
 		ldb_asprintf_errstring(ldb, 
 				       "partition_init: "
@@ -273,7 +274,7 @@ static int new_partition_from_dn(struct ldb_context *ldb, struct partition_priva
 		talloc_free(*partition);
 		return ret;
 	}
-	ret = ldb_init_module_chain(ldb, module_chain);
+	ret = ldb_module_init_chain(ldb, module_chain);
 	if (ret != LDB_SUCCESS) {
 		ldb_asprintf_errstring(ldb,
 				       "partition_init: "
@@ -289,13 +290,13 @@ static int new_partition_from_dn(struct ldb_context *ldb, struct partition_priva
 		talloc_free(*partition);
 		return ldb_oom(ldb);
 	}
-	(*partition)->module->next = talloc_steal((*partition)->module, module_chain);
+	ldb_module_set_next((*partition)->module, talloc_steal((*partition)->module, module_chain));
 
 	/* if we were in a transaction then we need to start a
 	   transaction on this new partition, otherwise we'll get a
 	   transaction mismatch when we end the transaction */
 	if (data->in_transaction) {
-		if (ldb->flags & LDB_FLG_ENABLE_TRACING) {
+		if (ldb_module_flags(ldb) & LDB_FLG_ENABLE_TRACING) {
 			ldb_debug(ldb, LDB_DEBUG_TRACE, "partition_start_trans() -> %s (new partition)", 
 				  ldb_dn_get_linearized((*partition)->ctrl->dn));
 		}
@@ -685,7 +686,7 @@ int partition_create(struct ldb_module *module, struct ldb_request *req)
 	struct dsdb_create_partition_exop *ex_op = talloc_get_type(req->op.extended.data, struct dsdb_create_partition_exop);
 	struct ldb_dn *dn = ex_op->new_dn;
 
-	data = talloc_get_type(module->private_data, struct partition_private_data);
+	data = talloc_get_type(ldb_module_get_private(module), struct partition_private_data);
 	if (!data) {
 		/* We are not going to create a partition before we are even set up */
 		return LDB_ERR_UNWILLING_TO_PERFORM;
@@ -830,7 +831,7 @@ int partition_init(struct ldb_module *module)
 		return ret;
 	}
 
-	module->private_data = talloc_steal(module, data);
+	ldb_module_set_private(module, talloc_steal(module, data));
 	talloc_free(mem_ctx);
 
 	ret = ldb_mod_register_control(module, LDB_CONTROL_DOMAIN_SCOPE_OID);
diff --git a/source4/dsdb/samdb/ldb_modules/samba_dsdb.c b/source4/dsdb/samdb/ldb_modules/samba_dsdb.c
index da20487..f07d03f 100644
--- a/source4/dsdb/samdb/ldb_modules/samba_dsdb.c
+++ b/source4/dsdb/samdb/ldb_modules/samba_dsdb.c
@@ -34,8 +34,6 @@
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
 #include "lib/ldb/include/ldb_module.h"
-#include "lib/ldb/include/ldb_private.h"
-
 #include "dsdb/samdb/ldb_modules/util.h"
 #include "dsdb/samdb/samdb.h"
 #include "librpc/ndr/libndr.h"
@@ -341,13 +339,13 @@ static int samba_dsdb_init(struct ldb_module *module)
 	/* The backend (at least until the partitions module
 	 * reconfigures things) is the next module in the currently
 	 * loaded chain */
-	backend_module = module->next;
-	ret = ldb_load_modules_list(ldb, reverse_module_list, backend_module, &module_chain);
+	backend_module = ldb_module_next(module);
+	ret = ldb_module_load_list(ldb, reverse_module_list, backend_module, &module_chain);
 	CHECK_LDB_RET(ret);
 
 	talloc_free(tmp_ctx);
 	/* Set this as the 'next' module, so that we effectivly append it to module chain */
-	module->next = module_chain;
+	ldb_module_set_next(module, module_chain);
 
 	return ldb_next_init(module);
 }
diff --git a/source4/dsdb/samdb/ldb_modules/samba_secrets.c b/source4/dsdb/samdb/ldb_modules/samba_secrets.c
index ae3b7fc..65ed237 100644
--- a/source4/dsdb/samdb/ldb_modules/samba_secrets.c
+++ b/source4/dsdb/samdb/ldb_modules/samba_secrets.c
@@ -33,8 +33,6 @@
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
 #include "lib/ldb/include/ldb_module.h"
-#include "lib/ldb/include/ldb_private.h"
-
 #include "dsdb/samdb/ldb_modules/util.h"
 #include "dsdb/samdb/samdb.h"
 
@@ -78,8 +76,8 @@ static int samba_secrets_init(struct ldb_module *module)
 	/* The backend (at least until the partitions module
 	 * reconfigures things) is the next module in the currently
 	 * loaded chain */
-	backend_module = module->next;
-	ret = ldb_load_modules_list(ldb, reverse_module_list, backend_module, &module_chain);
+	backend_module = ldb_module_next(module);
+	ret = ldb_module_load_list(ldb, reverse_module_list, backend_module, &module_chain);
 	if (ret != LDB_SUCCESS) {
 		talloc_free(tmp_ctx);
 		return ret;
@@ -87,7 +85,7 @@ static int samba_secrets_init(struct ldb_module *module)
 
 	talloc_free(tmp_ctx);
 	/* Set this as the 'next' module, so that we effectivly append it to module chain */
-	module->next = module_chain;
+	ldb_module_set_next(module, module_chain);
 
 	return ldb_next_init(module);
 }
diff --git a/source4/dsdb/samdb/ldb_modules/schema.c b/source4/dsdb/samdb/ldb_modules/schema.c
index 916017f..1a507fe 100644
--- a/source4/dsdb/samdb/ldb_modules/schema.c
+++ b/source4/dsdb/samdb/ldb_modules/schema.c
@@ -27,7 +27,7 @@
 #include "dsdb/samdb/samdb.h"
 #include "util.h"
 #include "libcli/security/security.h"
-#include "lib/ldb/include/ldb_private.h"
+
 
 const struct dsdb_class * get_last_structural_class(const struct dsdb_schema *schema,const struct ldb_message_element *element)
 {
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c
index 14fccb9..e42bc77 100644
--- a/source4/dsdb/samdb/ldb_modules/util.c
+++ b/source4/dsdb/samdb/ldb_modules/util.c
@@ -27,7 +27,6 @@
 #include "dsdb/samdb/samdb.h"
 #include "util.h"
 #include "libcli/security/security.h"
-#include "lib/ldb/include/ldb_private.h"
 #include "libcli/security/session.h"
 
 /*
@@ -1105,10 +1104,7 @@ bool dsdb_block_anonymous_ops(struct ldb_module *module,
  */
 void dsdb_req_chain_debug(struct ldb_request *req, int level)
 {
-	int i=0;
-
-	while (req && req->handle) {
-		DEBUG(level,("req[%u] %p  : %s\n", i++, req, ldb_req_location(req)));
-		req = req->handle->parent;
-	}
+	char *s = ldb_module_call_chain(req, req);
+	DEBUG(level, ("%s\n", s));
+	talloc_free(s);
 }
diff --git a/source4/dsdb/samdb/ldb_modules/wscript_build b/source4/dsdb/samdb/ldb_modules/wscript_build
index 4fe807f..1232465 100644
--- a/source4/dsdb/samdb/ldb_modules/wscript_build
+++ b/source4/dsdb/samdb/ldb_modules/wscript_build
@@ -64,16 +64,6 @@ bld.SAMBA_MODULE('ldb_repl_meta_data',
 	)
 
 
-bld.SAMBA_MODULE('ldb_dsdb_cache',
-	source='dsdb_cache.c',
-	subsystem='ldb',
-	init_function='ldb_dsdb_cache_module_init',
-        module_init_name='ldb_init_module',
-	internal_module=False,
-	deps='SAMDB talloc events'
-	)
-
-
 bld.SAMBA_MODULE('ldb_schema_load',
 	source='schema_load.c',
 	subsystem='ldb',
diff --git a/source4/lib/ldb-samba/samba_extensions.c b/source4/lib/ldb-samba/samba_extensions.c
index 6eeac0b..63b0f3d 100644
--- a/source4/lib/ldb-samba/samba_extensions.c
+++ b/source4/lib/ldb-samba/samba_extensions.c
@@ -24,7 +24,6 @@


-- 
Samba Shared Repository


More information about the samba-cvs mailing list