[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-611-ga5cdf36

Andrew Tridgell tridge at samba.org
Mon Sep 21 16:29:18 MDT 2009


The branch, master has been updated
       via  a5cdf36c3f8e4bf0aadba1add1ca1f212a8189b0 (commit)
       via  ac56fed2f44f6847ad99fbf13c877cb52322087b (commit)
       via  b23294e4071543db4628253222c893931a16b91c (commit)
       via  97ffb912c164e94728e5d3f82d602bb086bf65a4 (commit)
       via  5b684bbfd761924360c08a32d657a33bc92b8f9c (commit)
       via  2fda203230b2bdeee61c23def0f4ac1eba807596 (commit)
       via  dd7f94a9e2bcab626b6c0d8eb498259ed132cc9b (commit)
      from  1afc7c453c1d5f7e761e46cdc69900305a149820 (commit)

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


- Log -----------------------------------------------------------------
commit a5cdf36c3f8e4bf0aadba1add1ca1f212a8189b0
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Sep 21 15:25:10 2009 -0700

    s4-samdb: enable ldb tracing when log level >= 10

commit ac56fed2f44f6847ad99fbf13c877cb52322087b
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Sep 21 15:24:55 2009 -0700

    s4-schema: don't trace the schema load (too verbose)

commit b23294e4071543db4628253222c893931a16b91c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Sep 21 15:24:39 2009 -0700

    s4-ldb: add --trace command line option to ldb tools
    
    This enabled LDB_FLG_ENABLE_TRACING

commit 97ffb912c164e94728e5d3f82d602bb086bf65a4
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Sep 21 15:24:14 2009 -0700

    s4-ldb: add a LDB_FLG_ENABLE_TRACING for full ldb tracing
    
    When LDB_FLG_ENABLE_TRACING is set ldb will send full traces
    of all operations and results

commit 5b684bbfd761924360c08a32d657a33bc92b8f9c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Sep 20 18:58:18 2009 -0700

    s4-ldap: default edn type is 0

commit 2fda203230b2bdeee61c23def0f4ac1eba807596
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Sep 20 18:24:23 2009 -0700

    s4-ldb: add support for extended DNs in the rootDSE
    
    W2K8 join as a DC relies on being able to ask for the sid component of
    extended DNs from the rootDSE DNs

commit dd7f94a9e2bcab626b6c0d8eb498259ed132cc9b
Author: Andrew Tridgell <tridge at samba.org>
Date:   Sun Sep 20 15:45:53 2009 -0700

    s4-dsdb: fixed a printf format warning

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

Summary of changes:
 source4/dsdb/common/util.c               |    2 +-
 source4/dsdb/samdb/ldb_modules/rootdse.c |  137 +++++++++++++++++++++++++++++-
 source4/dsdb/schema/schema_init.c        |   36 +++++---
 source4/lib/ldb/common/ldb.c             |   90 +++++++++++++++++++
 source4/lib/ldb/common/ldb_debug.c       |   15 +++-
 source4/lib/ldb/common/ldb_modules.c     |   22 +++++
 source4/lib/ldb/include/ldb.h            |    9 ++
 source4/lib/ldb/tools/cmdline.c          |    5 +
 source4/lib/ldb/tools/cmdline.h          |    1 +
 source4/lib/ldb_wrap.c                   |    4 +
 10 files changed, 305 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 1fe5979..126f9fa 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1454,7 +1454,7 @@ bool samdb_is_capable_dc(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
 		samdb_base_dn(ldb), "nTMixedDomain", NULL);
 
 	if (errmsg != NULL)
-		*errmsg = talloc_asprintf(mem_ctx, "");
+		*errmsg = talloc_strdup(mem_ctx, "");
 
 	if (level_forest == -1 || level_domain == -1 || level_domain_mixed == -1) {
 		ret = false;
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 59ea51d..a8e08ec 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -51,15 +51,128 @@ static int do_attribute_explicit(const char * const *attrs, const char *name)
 
 
 /*
+  expand a DN attribute to include extended DN information if requested
+ */
+static int expand_dn_in_message(struct ldb_module *module, struct ldb_message *msg,
+				const char *attrname, struct ldb_control *edn_control,
+				struct ldb_request *req)
+{
+	struct ldb_dn *dn, *dn2;
+	struct ldb_val *v;
+	int ret;
+	struct ldb_request *req2;
+	char *dn_string;
+	const char *no_attrs[] = { NULL };
+	struct ldb_result *res;
+	struct ldb_extended_dn_control *edn;
+	TALLOC_CTX *tmp_ctx = talloc_new(req);
+	struct ldb_context *ldb;
+	int edn_type = 0;
+
+	ldb = ldb_module_get_ctx(module);
+
+	edn = talloc_get_type(edn_control->data, struct ldb_extended_dn_control);
+	if (edn) {
+		edn_type = edn->type;
+	}
+
+	v = discard_const_p(struct ldb_val, ldb_msg_find_ldb_val(msg, attrname));
+	if (v == NULL) {
+		talloc_free(tmp_ctx);
+		return 0;
+	}
+
+	dn_string = talloc_strndup(tmp_ctx, (const char *)v->data, v->length);
+	if (dn_string == NULL) {
+		talloc_free(tmp_ctx);
+		return LDB_ERR_OPERATIONS_ERROR;
+	}
+
+	res = talloc_zero(tmp_ctx, struct ldb_result);
+	if (res == NULL) {
+		talloc_free(tmp_ctx);
+		return LDB_ERR_OPERATIONS_ERROR;
+	}
+
+	dn = ldb_dn_new(tmp_ctx, ldb, dn_string);
+	if (!ldb_dn_validate(dn)) {
+		talloc_free(tmp_ctx);
+		return LDB_ERR_OPERATIONS_ERROR;
+	}
+
+	ret = ldb_build_search_req(&req2, ldb, tmp_ctx,
+				   dn,
+				   LDB_SCOPE_BASE,
+				   NULL,
+				   no_attrs,
+				   NULL,
+				   res, ldb_search_default_callback,
+				   req);
+	if (ret != LDB_SUCCESS) {
+		talloc_free(tmp_ctx);
+		return ret;
+	}
+
+
+	ret = ldb_request_add_control(req2,
+				      LDB_CONTROL_EXTENDED_DN_OID,
+				      edn_control->critical, edn);
+	if (ret != LDB_SUCCESS) {
+		talloc_free(tmp_ctx);
+		return ret;
+	}
+
+	ret = ldb_next_request(module, req2);
+	if (ret == LDB_SUCCESS) {
+		ret = ldb_wait(req2->handle, LDB_WAIT_ALL);
+	}
+	if (ret != LDB_SUCCESS) {
+		talloc_free(tmp_ctx);
+		return ret;
+	}
+
+	if (!res || res->count != 1) {
+		talloc_free(tmp_ctx);
+		return LDB_ERR_OPERATIONS_ERROR;
+	}
+
+	dn2 = res->msgs[0]->dn;
+
+	v->data = (uint8_t *)ldb_dn_get_extended_linearized(msg->elements, dn2, edn_type);
+	v->length = strlen((char *)v->data);
+
+	if (v->data == NULL) {
+		talloc_free(tmp_ctx);
+		return LDB_ERR_OPERATIONS_ERROR;
+	}
+
+	talloc_free(tmp_ctx);
+
+	return 0;
+}	
+			
+
+/*
   add dynamically generated attributes to rootDSE result
 */
-static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *msg, const char * const *attrs)
+static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *msg, 
+			       const char * const *attrs, struct ldb_request *req)
 {
 	struct ldb_context *ldb;
 	struct private_data *priv = talloc_get_type(ldb_module_get_private(module), struct private_data);
 	char **server_sasl;
 	const struct dsdb_schema *schema;
 	int *val;
+	struct ldb_control *edn_control;
+	const char *dn_attrs[] = {
+		"configurationNamingContext",
+		"defaultNamingContext",
+		"dsServiceName",
+		"rootDomainNamingContext",
+		"schemaNamingContext",
+		"serverName",
+		NULL
+	};
 
 	ldb = ldb_module_get_ctx(module);
 	schema = dsdb_get_schema(ldb);
@@ -233,6 +346,26 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
 		}
 	}
 
+	edn_control = ldb_request_get_control(req, LDB_CONTROL_EXTENDED_DN_OID);
+
+	/* if the client sent us the EXTENDED_DN control then we need
+	   to expand the DNs to have GUID and SID. W2K8 join relies on
+	   this */
+	if (edn_control) {
+		int i, ret;
+		for (i=0; dn_attrs[i]; i++) {
+			if (!do_attribute(attrs, dn_attrs[i])) continue;
+			ret = expand_dn_in_message(module, msg, dn_attrs[i],
+						   edn_control, req);
+			if (ret != LDB_SUCCESS) {
+				DEBUG(0,(__location__ ": Failed to expand DN in rootDSE for %s\n",
+					 dn_attrs[i]));
+				goto failed;
+			}
+		}
+	}
+
+
 	/* TODO: lots more dynamic attributes should be added here */
 
 	return LDB_SUCCESS;
@@ -301,7 +434,7 @@ static int rootdse_callback(struct ldb_request *req, struct ldb_reply *ares)
 		/* for each record returned post-process to add any dynamic
 		   attributes that have been asked for */
 		ret = rootdse_add_dynamic(ac->module, ares->message,
-					  ac->req->op.search.attrs);
+					  ac->req->op.search.attrs, ac->req);
 		if (ret != LDB_SUCCESS) {
 			talloc_free(ares);
 			return ldb_module_done(ac->req, NULL, NULL, ret);
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 9f7d967..fa1953a 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -1028,6 +1028,7 @@ int dsdb_schema_from_schema_dn(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
 		"fSMORoleOwner",
 		NULL
 	};
+	unsigned flags;
 
 	tmp_ctx = talloc_new(mem_ctx);
 	if (!tmp_ctx) {
@@ -1035,27 +1036,28 @@ int dsdb_schema_from_schema_dn(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
+	/* we don't want to trace the schema load */
+	flags = ldb_get_flags(ldb);
+	ldb_set_flags(ldb, flags & ~LDB_FLG_ENABLE_TRACING);
+
 	/*
 	 * setup the prefix mappings and schema info
 	 */
 	ret = ldb_search(ldb, tmp_ctx, &schema_res,
 			 schema_dn, LDB_SCOPE_BASE, schema_attrs, NULL);
 	if (ret == LDB_ERR_NO_SUCH_OBJECT) {
-		talloc_free(tmp_ctx);
-		return ret;
+		goto failed;
 	} else if (ret != LDB_SUCCESS) {
 		*error_string_out = talloc_asprintf(mem_ctx, 
 				       "dsdb_schema: failed to search the schema head: %s",
 				       ldb_errstring(ldb));
-		talloc_free(tmp_ctx);
-		return ret;
+		goto failed;
 	}
 	if (schema_res->count != 1) {
 		*error_string_out = talloc_asprintf(mem_ctx, 
 			      "dsdb_schema: [%u] schema heads found on a base search",
 			      schema_res->count);
-		talloc_free(tmp_ctx);
-		return LDB_ERR_CONSTRAINT_VIOLATION;
+		goto failed;
 	}
 
 	/*
@@ -1068,8 +1070,7 @@ int dsdb_schema_from_schema_dn(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
 		*error_string_out = talloc_asprintf(mem_ctx, 
 				       "dsdb_schema: failed to search attributeSchema objects: %s",
 				       ldb_errstring(ldb));
-		talloc_free(tmp_ctx);
-		return ret;
+		goto failed;
 	}
 
 	/*
@@ -1082,8 +1083,7 @@ int dsdb_schema_from_schema_dn(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
 		*error_string_out = talloc_asprintf(mem_ctx, 
 				       "dsdb_schema: failed to search attributeSchema objects: %s",
 				       ldb_errstring(ldb));
-		talloc_free(tmp_ctx);
-		return ret;
+		goto failed;
 	}
 
 	ret = dsdb_schema_from_ldb_results(tmp_ctx, ldb,
@@ -1093,13 +1093,25 @@ int dsdb_schema_from_schema_dn(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
 		*error_string_out = talloc_asprintf(mem_ctx, 
 						    "dsdb_schema load failed: %s",
 						    error_string);
-		talloc_free(tmp_ctx);
-		return ret;
+		goto failed;
 	}
 	talloc_steal(mem_ctx, *schema);
 	talloc_free(tmp_ctx);
 
+	if (flags & LDB_FLG_ENABLE_TRACING) {
+		flags = ldb_get_flags(ldb);
+		ldb_set_flags(ldb, flags | LDB_FLG_ENABLE_TRACING);
+	}
+
 	return LDB_SUCCESS;
+
+failed:
+	if (flags & LDB_FLG_ENABLE_TRACING) {
+		flags = ldb_get_flags(ldb);
+		ldb_set_flags(ldb, flags | LDB_FLG_ENABLE_TRACING);
+	}
+	talloc_free(tmp_ctx);
+	return ret;
 }	
 
 
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index b75d837..2ad5905 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -622,6 +622,86 @@ int ldb_request_get_status(struct ldb_request *req)
 	return req->handle->status;
 }
 
+
+/*
+  trace a ldb request
+*/
+static void ldb_trace_request(struct ldb_context *ldb, struct ldb_request *req)
+{
+	TALLOC_CTX *tmp_ctx = talloc_new(req);
+	int i;
+
+	switch (req->operation) {
+	case LDB_SEARCH:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: SEARCH");
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " dn: %s",
+			  ldb_dn_get_linearized(req->op.search.base));
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " scope: %s", 
+			  req->op.search.scope==LDB_SCOPE_BASE?"base":
+			  req->op.search.scope==LDB_SCOPE_ONELEVEL?"one":
+			  req->op.search.scope==LDB_SCOPE_SUBTREE?"sub":"UNKNOWN");
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " expr: %s", 
+			  ldb_filter_from_tree(tmp_ctx, req->op.search.tree));
+		for (i=0; req->op.search.attrs && req->op.search.attrs[i]; i++) {
+			ldb_debug(ldb, LDB_DEBUG_TRACE, " attr: %s", req->op.search.attrs[i]);
+		}
+		break;
+	case LDB_DELETE:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: DELETE");
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " dn: %s", 
+			  ldb_dn_get_linearized(req->op.del.dn));
+		break;
+	case LDB_RENAME:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: RENAME");
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " olddn: %s", 
+			  ldb_dn_get_linearized(req->op.rename.olddn));
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " newdn: %s", 
+			  ldb_dn_get_linearized(req->op.rename.newdn));
+		break;
+	case LDB_EXTENDED:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: EXTENDED");
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " oid: %s", req->op.extended.oid);
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " data: %s", req->op.extended.data?"yes":"no");
+		break;
+	case LDB_ADD:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: ADD");
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "%s", 
+			  ldb_ldif_message_string(req->handle->ldb, tmp_ctx, 
+						  LDB_CHANGETYPE_ADD, req->op.add.message));
+		break;
+	case LDB_MODIFY:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: MODIFY");
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "%s", 
+			  ldb_ldif_message_string(req->handle->ldb, tmp_ctx, 
+						  LDB_CHANGETYPE_ADD, req->op.mod.message));
+		break;
+	case LDB_REQ_REGISTER_CONTROL:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: REGISTER_CONTROL");
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "%s", 
+			  req->op.reg_control.oid);
+		break;
+	case LDB_REQ_REGISTER_PARTITION:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: REGISTER_PARTITION");
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "%s", 
+			  ldb_dn_get_linearized(req->op.reg_partition.dn));
+		break;
+	default:
+		ldb_debug(ldb, LDB_DEBUG_TRACE, "ldb_trace_request: UNKNOWN(%u)", 
+			  req->operation);
+		break;
+	}
+
+	for (i=0; req->controls && req->controls[i]; i++) {
+		ldb_debug(ldb, LDB_DEBUG_TRACE, " control: %s  crit:%u  data:%s", 
+			  req->controls[i]->oid, 
+			  req->controls[i]->critical, 
+			  req->controls[i]->data?"yes":"no");
+	}
+
+	talloc_free(tmp_ctx);
+}
+
+
 /*
   start an ldb request
   NOTE: the request must be a talloc context.
@@ -639,6 +719,10 @@ int ldb_request(struct ldb_context *ldb, struct ldb_request *req)
 
 	ldb_reset_err_string(ldb);
 
+	if (ldb->flags & LDB_FLG_ENABLE_TRACING) {
+		ldb_trace_request(ldb, req);
+	}
+
 	/* call the first module in the chain */
 	switch (req->operation) {
 	case LDB_SEARCH:
@@ -1509,3 +1593,9 @@ unsigned int ldb_get_flags(struct ldb_context *ldb)
 {
 	return ldb->flags;
 }
+
+/* set the ldb flags */
+void ldb_set_flags(struct ldb_context *ldb, unsigned flags)
+{
+	ldb->flags = flags;
+}
diff --git a/source4/lib/ldb/common/ldb_debug.c b/source4/lib/ldb/common/ldb_debug.c
index 7680862..4612b01 100644
--- a/source4/lib/ldb/common/ldb_debug.c
+++ b/source4/lib/ldb/common/ldb_debug.c
@@ -60,6 +60,15 @@ static void ldb_debug_stderr(void *context, enum ldb_debug_level level,
 	}
 }
 
+static void ldb_debug_stderr_all(void *context, enum ldb_debug_level level, 
+			     const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0);
+static void ldb_debug_stderr_all(void *context, enum ldb_debug_level level, 
+			     const char *fmt, va_list ap)
+{
+	vfprintf(stderr, fmt, ap);
+	fprintf(stderr, "\n");
+}
+
 /*
   convenience function to setup debug messages on stderr
   messages of level LDB_DEBUG_WARNING and higher are printed
@@ -76,7 +85,11 @@ void ldb_debug(struct ldb_context *ldb, enum ldb_debug_level level, const char *
 {
 	va_list ap;
 	if (ldb->debug_ops.debug == NULL) {
-		ldb_set_debug_stderr(ldb);
+		if (ldb->flags & LDB_FLG_ENABLE_TRACING) {
+			ldb_set_debug(ldb, ldb_debug_stderr_all, ldb);
+		} else {
+			ldb_set_debug_stderr(ldb);
+		}
 	}
 	va_start(ap, fmt);
 	ldb->debug_ops.debug(ldb->debug_ops.context, level, fmt, ap);
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index 206b225..c57d0e4 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -672,6 +672,14 @@ int ldb_module_send_entry(struct ldb_request *req,
 	ares->controls = talloc_steal(ares, ctrls);
 	ares->error = LDB_SUCCESS;
 
+	if (req->handle->ldb->flags & LDB_FLG_ENABLE_TRACING) {
+		char *s;
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "ldb_trace_response: ENTRY");
+		s = ldb_ldif_message_string(req->handle->ldb, msg, LDB_CHANGETYPE_NONE, msg);
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "%s", s);
+		talloc_free(s);			  
+	}
+
 	return req->callback(req, ares);
 }
 
@@ -697,6 +705,11 @@ int ldb_module_send_referral(struct ldb_request *req,
 	ares->referral = talloc_steal(ares, ref);
 	ares->error = LDB_SUCCESS;
 
+	if (req->handle->ldb->flags & LDB_FLG_ENABLE_TRACING) {
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "ldb_trace_response: REFERRAL");
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "ref: %s", ref);
+	}
+
 	return req->callback(req, ares);
 }
 
@@ -729,6 +742,15 @@ int ldb_module_done(struct ldb_request *req,
 
 	req->handle->flags |= LDB_HANDLE_FLAG_DONE_CALLED;
 
+	if (req->handle->ldb->flags & LDB_FLG_ENABLE_TRACING) {
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "ldb_trace_response: DONE");
+		ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "error: %u", error);
+		if (ldb_errstring(req->handle->ldb)) {
+			ldb_debug(req->handle->ldb, LDB_DEBUG_TRACE, "msg: %s", 
+				  ldb_errstring(req->handle->ldb));
+		}
+	}
+
 	req->callback(req, ares);
 	return error;
 }
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 047e66c..0378697 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -246,6 +246,11 @@ struct ldb_utf8_fns {
 */
 #define LDB_FLG_SHOW_BINARY 16
 
+/**
+   Flags to enable ldb tracing
+*/
+#define LDB_FLG_ENABLE_TRACING 32
+
 /*
    structures for ldb_parse_tree handling code
 */
@@ -1914,4 +1919,8 @@ struct ldb_control **ldb_parse_control_strings(struct ldb_context *ldb, TALLOC_C
 */
 unsigned int ldb_get_flags(struct ldb_context *ldb);
 
+/* set the ldb flags */
+void ldb_set_flags(struct ldb_context *ldb, unsigned flags);
+
+
 #endif
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index 8541106..73bf2a9 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -44,6 +44,7 @@ static struct poptOption popt_options[] = {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list