[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Sat Sep 25 11:38:42 MDT 2010


The branch, master has been updated
       via  85ba790 ldb: mark the location of a lot more ldb requests
       via  5568fcd s4-dsdb: added tagging of requests in dsdb modules
       via  f4893e7 ldb: added request location tracking
       via  d72dbe8 s4-repl: make getncchanges a bit less verbose
       via  c53210b s4-net: added --ipaddress option to net commands
       via  3d7a4cf s4-pynet: added server keyword to Net() initialisation
       via  805d942 s4-libnet: added server_address option in libnet context
       via  a360428 s4-finddcs: allow override of server IP address
       via  bd228f9 s4-repl: don't store repsFrom on DNs other than NC heads
       via  781796c s4-pycredentials: avoid a tallloc_free on ref
       via  a1d5254 s4-repl: use namingContexts from rootDSE to initialise partition list
       via  3704467 s4-repl: force on WRIT_REP when we are a writable replica
       via  3aea12d s4-repl: use dreplsrv_partition_source_dsa_by_guid to find source dsa
       via  ca847b5 torture: fixed a valgrind error in SMB2-CREATE
      from  99f0891 s4-dsdb: Fixed a call to the wrong ops function in dsdb_module_search_dn.

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


- Log -----------------------------------------------------------------
commit 85ba79063f35b5a073b3670b82daa2aa6dfb40bb
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Sep 24 12:50:13 2010 -0700

    ldb: mark the location of a lot more ldb requests

commit 5568fcd88b2a32ba389694ee35ab521af1ea7394
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Sep 24 12:09:26 2010 -0700

    s4-dsdb: added tagging of requests in dsdb modules
    
    this allows you to call dsdb_req_chain_debug() in gdb or when writing
    debug code to see the request chain

commit f4893e7d33b7c9aaafba5ce8657972d3eb600257
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Sep 24 12:07:16 2010 -0700

    ldb: added request location tracking
    
    this is used to help debug async ldb requests. The ldb request handle
    now contains a location string and the parent request pointer. This
    allows us to print a backtrace of ldb requests in the dsdb modules.

commit d72dbe847e0db605e950e6656d758cb60bf628a7
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Sep 24 10:05:07 2010 -0700

    s4-repl: make getncchanges a bit less verbose
    
    this should reduce some of the clutter in make test

commit c53210bf0609de982d0b36f76198defc8a4502da
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 19:51:36 2010 -0700

    s4-net: added --ipaddress option to net commands
    
    this allows override of server IP address, bypassing NBT or DNS name
    resolution of DCs
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>

commit 3d7a4cf5b68a1adcc4b7b53819ffc0c580e92da0
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 19:52:19 2010 -0700

    s4-pynet: added server keyword to Net() initialisation
    
    this sets up server_address in the libnet context
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>

commit 805d9425c2ee06e1695e451500d1ffbf90ca8e72
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 19:50:00 2010 -0700

    s4-libnet: added server_address option in libnet context
    
    this is used by libnet_LookupDCs
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>

commit a360428588467c29e8eb40b27a9db525d4c2ea96
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 19:49:12 2010 -0700

    s4-finddcs: allow override of server IP address
    
    this will be used to implement --ipaddress option to net commands
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>

commit bd228f98588919880ca3a9e4c1f23e17ce78aca5
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 19:48:03 2010 -0700

    s4-repl: don't store repsFrom on DNs other than NC heads
    
    we don't want a refsFrom on the Rid Manage$ DN
    
    Pair-Programmed-With: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>

commit 781796c557025f4bf8c62b903acc1be64acc35b8
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 19:46:27 2010 -0700

    s4-pycredentials: avoid a tallloc_free on ref
    
    with the new py object structure, we need to unlink not free

commit a1d52540a377c587552bcc7d5cc085d3774e1c01
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 15:40:20 2010 -0700

    s4-repl: use namingContexts from rootDSE to initialise partition list
    
    this is preferable to looking for the hasMasterNCs attribute on
    nTDSDSA objects.

commit 370446769dc0fff752f9fb40c7dcf878cc5cd92e
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 15:39:37 2010 -0700

    s4-repl: force on WRIT_REP when we are a writable replica
    
    this ensures we always mark ourselves as writeable when we are not
    an RODC

commit 3aea12d0ab70997355904aa6625fce6015657aa7
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 15:38:07 2010 -0700

    s4-repl: use dreplsrv_partition_source_dsa_by_guid to find source dsa
    
    this avoids a list walk in the calling code

commit ca847b593d83f7ce09473469bd79531fdc8d0359
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 23 15:33:36 2010 -0700

    torture: fixed a valgrind error in SMB2-CREATE
    
    the lock structure had uninitialised elements, so we sent a random
    length.
    
    This also adds a 1 byte write, so there is real data that is being
    truncated with the 2nd open

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

Summary of changes:
 source4/auth/credentials/pycredentials.c           |    2 +-
 source4/dsdb/repl/drepl_extended.c                 |   18 ++--
 source4/dsdb/repl/drepl_partitions.c               |  103 ++++++++-----------
 source4/dsdb/samdb/ldb_modules/acl.c               |    1 +
 source4/dsdb/samdb/ldb_modules/anr.c               |    2 +
 source4/dsdb/samdb/ldb_modules/descriptor.c        |    5 +
 source4/dsdb/samdb/ldb_modules/extended_dn_in.c    |    6 +
 source4/dsdb/samdb/ldb_modules/extended_dn_out.c   |    1 +
 source4/dsdb/samdb/ldb_modules/extended_dn_store.c |    4 +-
 source4/dsdb/samdb/ldb_modules/instancetype.c      |    3 +-
 source4/dsdb/samdb/ldb_modules/lazy_commit.c       |    6 +
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |    4 +
 source4/dsdb/samdb/ldb_modules/local_password.c    |   11 ++
 source4/dsdb/samdb/ldb_modules/new_partition.c     |    2 +
 source4/dsdb/samdb/ldb_modules/objectclass.c       |    9 ++
 source4/dsdb/samdb/ldb_modules/objectclass_attrs.c |    3 +
 source4/dsdb/samdb/ldb_modules/objectguid.c        |    2 +
 source4/dsdb/samdb/ldb_modules/operational.c       |    1 +
 source4/dsdb/samdb/ldb_modules/partition.c         |   10 ++
 source4/dsdb/samdb/ldb_modules/partition_init.c    |    5 +-
 source4/dsdb/samdb/ldb_modules/password_hash.c     |   22 +++--
 source4/dsdb/samdb/ldb_modules/proxy.c             |    2 +-
 source4/dsdb/samdb/ldb_modules/ranged_results.c    |    1 +
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c    |   21 ++++-
 source4/dsdb/samdb/ldb_modules/resolve_oids.c      |    3 +
 source4/dsdb/samdb/ldb_modules/rootdse.c           |    2 +
 source4/dsdb/samdb/ldb_modules/samba3sid.c         |    1 +
 source4/dsdb/samdb/ldb_modules/samldb.c            |    1 +
 source4/dsdb/samdb/ldb_modules/schema_data.c       |    1 +
 source4/dsdb/samdb/ldb_modules/schema_load.c       |    1 +
 source4/dsdb/samdb/ldb_modules/show_deleted.c      |    1 +
 source4/dsdb/samdb/ldb_modules/simple_ldap_map.c   |    1 +
 source4/dsdb/samdb/ldb_modules/subtree_rename.c    |    2 +
 source4/dsdb/samdb/ldb_modules/update_keytab.c     |    5 +
 source4/dsdb/samdb/ldb_modules/util.c              |   24 +++++
 source4/lib/ldb/common/ldb.c                       |   26 +++++
 source4/lib/ldb/common/ldb_modules.c               |    2 +
 source4/lib/ldb/include/ldb.h                      |    7 ++
 source4/lib/ldb/include/ldb_private.h              |    4 +
 source4/libcli/finddc.h                            |    2 +
 source4/libcli/finddcs_cldap.c                     |   36 +++++++-
 source4/libnet/libnet.c                            |    2 +
 source4/libnet/libnet.h                            |    3 +
 source4/libnet/libnet_lookup.c                     |    2 +-
 source4/libnet/py_net.c                            |   10 ++-
 source4/rpc_server/drsuapi/getncchanges.c          |    2 +-
 source4/scripting/python/samba/getopt.py           |    7 ++
 source4/scripting/python/samba/netcmd/export.py    |    2 +-
 source4/scripting/python/samba/netcmd/join.py      |    2 +-
 source4/scripting/python/samba/netcmd/time.py      |    2 +-
 source4/scripting/python/samba/netcmd/user.py      |    4 +-
 source4/scripting/python/samba/netcmd/vampire.py   |    2 +-
 source4/torture/smb2/create.c                      |    6 +
 53 files changed, 310 insertions(+), 97 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c
index 879d906..b7de754 100644
--- a/source4/auth/credentials/pycredentials.c
+++ b/source4/auth/credentials/pycredentials.c
@@ -319,7 +319,7 @@ static PyObject *py_creds_get_named_ccache(py_talloc_Object *self, PyObject *arg
 
 	ret = cli_credentials_get_named_ccache(creds, event_ctx, lp_ctx,
 					       ccache_name, &ccc, &error_string);
-	talloc_free(lp_ctx);
+	talloc_unlink(mem_ctx, lp_ctx);
 	if (ret == 0) {
 		talloc_steal(ccc, event_ctx);
 		talloc_free(mem_ctx);
diff --git a/source4/dsdb/repl/drepl_extended.c b/source4/dsdb/repl/drepl_extended.c
index 2c9d1f0..cf1c25a 100644
--- a/source4/dsdb/repl/drepl_extended.c
+++ b/source4/dsdb/repl/drepl_extended.c
@@ -102,10 +102,6 @@ static WERROR drepl_create_extended_source_dsa(struct dreplsrv_service *service,
 		return WERR_NOMEM;
 	}
 
-	if (!service->am_rodc) {
-		sdsa->repsFrom1->replica_flags = DRSUAPI_DRS_WRIT_REP;
-	}
-
 	werr = dreplsrv_out_connection_attach(service, sdsa->repsFrom1, &sdsa->conn);
 	if (!W_ERROR_IS_OK(werr)) {
 		DEBUG(0,(__location__ ": Failed to attach connection to %s\n",
@@ -137,15 +133,19 @@ static WERROR drepl_create_extended_source_dsa(struct dreplsrv_service *service,
 	for (p=service->partitions; p; p=p->next) {
 		if (ldb_dn_compare(p->dn, nc_root) == 0) {
 			struct dreplsrv_partition_source_dsa *s;
-			for (s=p->sources; s; s=s->next) {
-				if (GUID_equal(&s->repsFrom1->source_dsa_obj_guid,
-					       &sdsa->repsFrom1->source_dsa_obj_guid)) {
-					sdsa->repsFrom1->highwatermark = s->repsFrom1->highwatermark;
-				}
+			werr = dreplsrv_partition_source_dsa_by_guid(p,
+								     &sdsa->repsFrom1->source_dsa_obj_guid,
+								     &s);
+			if (W_ERROR_IS_OK(werr)) {
+				sdsa->repsFrom1->highwatermark = s->repsFrom1->highwatermark;
+				sdsa->repsFrom1->replica_flags = s->repsFrom1->replica_flags;
 			}
 		}
 	}
 
+	if (!service->am_rodc) {
+		sdsa->repsFrom1->replica_flags |= DRSUAPI_DRS_WRIT_REP;
+	}
 
 	*_sdsa = sdsa;
 	return WERR_OK;
diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c
index 389a7b4..1e787c1 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -37,73 +37,56 @@
 WERROR dreplsrv_load_partitions(struct dreplsrv_service *s)
 {
 	WERROR status;
-	struct ldb_dn *basedn;
-	struct ldb_result *r;
-	struct ldb_message_element *el;
-	static const char *attrs[] = { "hasMasterNCs", "msDS-hasFullReplicaNCs", NULL };
+	static const char *attrs[] = { "namingContexts", NULL };
 	unsigned int i;
 	int ret;
+	TALLOC_CTX *tmp_ctx;
+	struct ldb_result *res;
+	struct ldb_message_element *el;
 
-	basedn = samdb_ntds_settings_dn(s->samdb);
-	W_ERROR_HAVE_NO_MEMORY(basedn);
+	tmp_ctx = talloc_new(s);
+	W_ERROR_HAVE_NO_MEMORY(tmp_ctx);
 
-	ret = ldb_search(s->samdb, s, &r, basedn, LDB_SCOPE_BASE, attrs,
-			 "(objectClass=*)");
+	ret = ldb_search(s->samdb, tmp_ctx, &res,
+			 ldb_dn_new(tmp_ctx, s->samdb, ""), LDB_SCOPE_BASE, attrs, NULL);
 	if (ret != LDB_SUCCESS) {
-		return WERR_FOOBAR;
-	} else if (r->count != 1) {
-		talloc_free(r);
-		return WERR_FOOBAR;
-	}
-
-
-
-	el = ldb_msg_find_element(r->msgs[0], "hasMasterNCs");
-
-	for (i=0; el && i < el->num_values; i++) {
-		const char *v = (const char *)el->values[i].data;
-		struct ldb_dn *pdn;
-		struct dreplsrv_partition *p;
-
-		pdn = ldb_dn_new(s, s->samdb, v);
-		if (!ldb_dn_validate(pdn)) {
-			return WERR_FOOBAR;
-		}
-
-		p = talloc_zero(s, struct dreplsrv_partition);
-		W_ERROR_HAVE_NO_MEMORY(p);
-
-		p->dn = talloc_steal(p, pdn);
-
-		DLIST_ADD(s->partitions, p);
-
-		DEBUG(2, ("dreplsrv_partition[%s] loaded\n", v));
-	}
+		DEBUG(1,("Searching for namingContexts in rootDSE failed: %s\n", ldb_errstring(s->samdb)));
+		talloc_free(tmp_ctx);
+		return WERR_DS_DRA_INTERNAL_ERROR;
+       }
 
-	el = ldb_msg_find_element(r->msgs[0], "msDS-hasFullReplicaNCs");
+       el = ldb_msg_find_element(res->msgs[0], "namingContexts");
+       if (!el) {
+               DEBUG(1,("Finding namingContexts element in root_res failed: %s\n",
+			ldb_errstring(s->samdb)));
+	       talloc_free(tmp_ctx);
+	       return WERR_DS_DRA_INTERNAL_ERROR;
+       }
 
-	for (i=0; el && i < el->num_values; i++) {
-		const char *v = (const char *)el->values[i].data;
-		struct ldb_dn *pdn;
-		struct dreplsrv_partition *p;
+       for (i=0; i<el->num_values; i++) {
+	       struct ldb_dn *pdn;
+	       struct dreplsrv_partition *p;
 
-		pdn = ldb_dn_new(s, s->samdb, v);
-		if (!ldb_dn_validate(pdn)) {
-			return WERR_FOOBAR;
-		}
+	       pdn = ldb_dn_from_ldb_val(tmp_ctx, s->samdb, &el->values[i]);
+	       if (pdn == NULL) {
+		       talloc_free(tmp_ctx);
+		       return WERR_DS_DRA_INTERNAL_ERROR;
+	       }
+	       if (!ldb_dn_validate(pdn)) {
+		       return WERR_DS_DRA_INTERNAL_ERROR;
+	       }
 
-		p = talloc_zero(s, struct dreplsrv_partition);
-		W_ERROR_HAVE_NO_MEMORY(p);
+	       p = talloc_zero(s, struct dreplsrv_partition);
+	       W_ERROR_HAVE_NO_MEMORY(p);
 
-		p->dn = talloc_steal(p, pdn);
-		p->incoming_only = true;
+	       p->dn = talloc_steal(p, pdn);
 
-		DLIST_ADD(s->partitions, p);
+	       DLIST_ADD(s->partitions, p);
 
-		DEBUG(2, ("dreplsrv_partition[%s] loaded (incoming only)\n", v));
+	       DEBUG(2, ("dreplsrv_partition[%s] loaded\n", ldb_dn_get_linearized(p->dn)));
 	}
 
-	talloc_free(r);
+	talloc_free(tmp_ctx);
 
 	status = dreplsrv_refresh_partitions(s);
 	W_ERROR_NOT_OK_RETURN(status);
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 826884f..497e1ad 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -1344,6 +1344,7 @@ static int acl_search(struct ldb_module *module, struct ldb_request *req)
 				      req->controls,
 				      ac, acl_search_callback,
 				      req);
+	LDB_REQ_SET_LOCATION(down_req);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c
index 15a8a7a..ebe9d66 100644
--- a/source4/dsdb/samdb/ldb_modules/anr.c
+++ b/source4/dsdb/samdb/ldb_modules/anr.c
@@ -32,6 +32,7 @@
 #include "includes.h"
 #include "ldb_module.h"
 #include "dsdb/samdb/samdb.h"
+#include "dsdb/samdb/ldb_modules/util.h"
 
 /**
  * Make a and 'and' or 'or' tree from the two supplied elements 
@@ -355,6 +356,7 @@ static int anr_search(struct ldb_module *module, struct ldb_request *req)
 					req->controls,
 					ac, anr_search_callback,
 					req);
+	LDB_REQ_SET_LOCATION(down_req);
 	if (ret != LDB_SUCCESS) {
 		return ldb_operr(ldb);
 	}
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index f32383e..959a7d8 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -645,6 +645,7 @@ static int descriptor_do_mod(struct descriptor_context *ac)
 				ac->req->controls,
 				ac, descriptor_op_callback,
 				ac->req);
+	LDB_REQ_SET_LOCATION(mod_req);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
@@ -744,6 +745,7 @@ static int descriptor_do_add(struct descriptor_context *ac)
 					ac->req->controls,
 					ac, descriptor_op_callback,
 					ac->req);
+		LDB_REQ_SET_LOCATION(add_req);
 		if (ret != LDB_SUCCESS) {
 			return ret;
 		}
@@ -755,6 +757,7 @@ static int descriptor_do_add(struct descriptor_context *ac)
 				   NULL,
 				   ac, get_search_oc_callback,
 				   ac->req);
+		LDB_REQ_SET_LOCATION(search_req);
 		if (ret != LDB_SUCCESS) {
 			return ret;
 		}
@@ -820,6 +823,7 @@ static int descriptor_change(struct ldb_module *module, struct ldb_request *req)
 				   NULL,
 				   ac, get_search_callback,
 				   req);
+	LDB_REQ_SET_LOCATION(search_req);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
@@ -857,6 +861,7 @@ static int descriptor_search(struct ldb_module *module, struct ldb_request *req)
 				      req->controls,
 				      ac, descriptor_search_callback,
 				      ac->req);
+	LDB_REQ_SET_LOCATION(down_req);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_in.c b/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
index c4d006f..78f0426 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
@@ -173,6 +173,7 @@ static int extended_base_callback(struct ldb_request *req, struct ldb_reply *are
 						      ac->req->controls,
 						      ac, extended_final_callback, 
 						      ac->req);
+			LDB_REQ_SET_LOCATION(down_req);
 			break;
 		case LDB_ADD:
 		{
@@ -191,6 +192,7 @@ static int extended_base_callback(struct ldb_request *req, struct ldb_reply *are
 						ac->req->controls,
 						ac, extended_final_callback, 
 						ac->req);
+			LDB_REQ_SET_LOCATION(down_req);
 			break;
 		}
 		case LDB_MODIFY:
@@ -210,6 +212,7 @@ static int extended_base_callback(struct ldb_request *req, struct ldb_reply *are
 						ac->req->controls,
 						ac, extended_final_callback, 
 						ac->req);
+			LDB_REQ_SET_LOCATION(down_req);
 			break;
 		}
 		case LDB_DELETE:
@@ -219,6 +222,7 @@ static int extended_base_callback(struct ldb_request *req, struct ldb_reply *are
 						ac->req->controls,
 						ac, extended_final_callback, 
 						ac->req);
+			LDB_REQ_SET_LOCATION(down_req);
 			break;
 		case LDB_RENAME:
 			ret = ldb_build_rename_req(&down_req,
@@ -228,6 +232,7 @@ static int extended_base_callback(struct ldb_request *req, struct ldb_reply *are
 						   ac->req->controls,
 						   ac, extended_final_callback, 
 						   ac->req);
+			LDB_REQ_SET_LOCATION(down_req);
 			break;
 		default:
 			return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR);
@@ -356,6 +361,7 @@ static int extended_dn_in_fix(struct ldb_module *module, struct ldb_request *req
 					   NULL,
 					   ac, extended_base_callback,
 					   req);
+		LDB_REQ_SET_LOCATION(down_req);
 		if (ret != LDB_SUCCESS) {
 			return ldb_operr(ldb_module_get_ctx(module));
 		}
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
index fc04013..2daae25 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
@@ -643,6 +643,7 @@ static int extended_dn_out_search(struct ldb_module *module, struct ldb_request
 				      req->controls,
 				      ac, callback,
 				      req);
+	LDB_REQ_SET_LOCATION(down_req);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
index 3f5f451..15af268 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
@@ -269,7 +269,7 @@ static int extended_store_replace(struct extended_dn_context *ac,
 				   ac->ldb, os, os->dsdb_dn->dn, LDB_SCOPE_BASE, NULL, 
 				   attrs, NULL, os, extended_replace_dn,
 				   ac->req);
-
+	LDB_REQ_SET_LOCATION(os->search_req);
 	if (ret != LDB_SUCCESS) {
 		talloc_free(os);
 		return ret;
@@ -337,6 +337,7 @@ static int extended_dn_add(struct ldb_module *module, struct ldb_request *req)
 			}
 		   
 			ret = ldb_build_add_req(&ac->new_req, ac->ldb, ac, msg, req->controls, ac, extended_final_callback, req);
+			LDB_REQ_SET_LOCATION(ac->new_req);
 			if (ret != LDB_SUCCESS) {
 				return ret;
 			}
@@ -412,6 +413,7 @@ static int extended_dn_modify(struct ldb_module *module, struct ldb_request *req
 			}
 		   
 			ret = ldb_build_mod_req(&ac->new_req, ac->ldb, ac, msg, req->controls, ac, extended_final_callback, req);
+			LDB_REQ_SET_LOCATION(ac->new_req);
 			if (ret != LDB_SUCCESS) {
 				talloc_free(ac);
 				return ret;
diff --git a/source4/dsdb/samdb/ldb_modules/instancetype.c b/source4/dsdb/samdb/ldb_modules/instancetype.c
index 0a11bcc..5032462 100644
--- a/source4/dsdb/samdb/ldb_modules/instancetype.c
+++ b/source4/dsdb/samdb/ldb_modules/instancetype.c
@@ -142,7 +142,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
 					ac->req->controls,
 					ac, it_add_callback,
 					ac->req);
-		
+		LDB_REQ_SET_LOCATION(ac->add_req);
 		if (ret != LDB_SUCCESS) {
 			return ret;
 		}
@@ -172,6 +172,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
 				req->controls,
 				req, dsdb_next_callback,
 				req);
+	LDB_REQ_SET_LOCATION(down_req);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
diff --git a/source4/dsdb/samdb/ldb_modules/lazy_commit.c b/source4/dsdb/samdb/ldb_modules/lazy_commit.c
index 6a59a96..b46f88a 100644
--- a/source4/dsdb/samdb/ldb_modules/lazy_commit.c
+++ b/source4/dsdb/samdb/ldb_modules/lazy_commit.c
@@ -50,6 +50,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req)
 					      req->controls,
 					      req, dsdb_next_callback,
 					      req);
+		LDB_REQ_SET_LOCATION(new_req);
 		break;
 	case LDB_ADD:
 		ret = ldb_build_add_req(&new_req, ldb_module_get_ctx(module), req,
@@ -57,6 +58,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req)
 					req->controls,
 					req, dsdb_next_callback,
 					req);
+		LDB_REQ_SET_LOCATION(new_req);
 		break;
 	case LDB_MODIFY:
 		ret = ldb_build_mod_req(&new_req, ldb_module_get_ctx(module), req,
@@ -64,6 +66,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req)
 					req->controls,
 					req, dsdb_next_callback,
 					req);
+		LDB_REQ_SET_LOCATION(new_req);
 		break;
 	case LDB_DELETE:
 		ret = ldb_build_del_req(&new_req, ldb_module_get_ctx(module), req,
@@ -71,6 +74,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req)
 					req->controls,
 					req, dsdb_next_callback,
 					req);
+		LDB_REQ_SET_LOCATION(new_req);
 		break;
 	case LDB_RENAME:
 		ret = ldb_build_rename_req(&new_req, ldb_module_get_ctx(module), req,
@@ -79,6 +83,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req)
 					   req->controls,
 					   req, dsdb_next_callback,
 					   req);
+		LDB_REQ_SET_LOCATION(new_req);
 		break;
 	case LDB_EXTENDED:
 		ret = ldb_build_extended_req(&new_req, ldb_module_get_ctx(module),
@@ -88,6 +93,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req)
 					     req->controls,
 					     req, dsdb_next_callback,
 					     req);
+		LDB_REQ_SET_LOCATION(new_req);
 		break;
 	default:
 		ldb_set_errstring(ldb_module_get_ctx(module),
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 29f9d0d..b09d0cb 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -563,6 +563,7 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
 					   NULL,
 					   ac, la_mod_search_callback,
 					   req);
+		LDB_REQ_SET_LOCATION(search_req);
 
 		/* We need to figure out our own extended DN, to fill in as the backlink target */
 		if (ret == LDB_SUCCESS) {
@@ -853,6 +854,7 @@ static int la_add_callback(struct ldb_request *req, struct ldb_reply *ares)
 					   NULL,
 					   ac, la_mod_search_callback,
 					   ac->req);
+		LDB_REQ_SET_LOCATION(search_req);
 
 		if (ret == LDB_SUCCESS) {
 			ret = ldb_request_add_control(search_req,
@@ -891,6 +893,7 @@ static int la_down_req(struct la_context *ac)
 					ac->req->controls,
 					ac, la_add_callback,
 					ac->req);
+		LDB_REQ_SET_LOCATION(down_req);
 		break;
 	case LDB_MODIFY:
 		ret = ldb_build_mod_req(&down_req, ldb, ac,
@@ -898,6 +901,7 @@ static int la_down_req(struct la_context *ac)
 					ac->req->controls,
 					ac, la_mod_del_callback,
 					ac->req);
+		LDB_REQ_SET_LOCATION(down_req);
 		break;
 	default:
 		ret = LDB_ERR_OPERATIONS_ERROR;
diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c
index 942b5a2..359a3d0 100644
--- a/source4/dsdb/samdb/ldb_modules/local_password.c
+++ b/source4/dsdb/samdb/ldb_modules/local_password.c
@@ -34,6 +34,7 @@
 #include "dsdb/samdb/samdb.h"
 #include "librpc/ndr/libndr.h"
 #include "dsdb/samdb/ldb_modules/password_modules.h"
+#include "dsdb/samdb/ldb_modules/util.h"
 
 #define PASSWORD_GUID_ATTR "masterGUID"
 
@@ -240,6 +241,7 @@ static int local_password_add(struct ldb_module *module, struct ldb_request *req
 				req->controls,
 				ac, lpdb_add_callback,
 				req);
+	LDB_REQ_SET_LOCATION(remote_req);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
@@ -283,6 +285,7 @@ static int lpdb_add_callback(struct ldb_request *req,
 				NULL,
 				ac, lpdb_local_callback,
 				ac->req);
+	LDB_REQ_SET_LOCATION(local_req);
 	if (ret != LDB_SUCCESS) {
 		return ldb_module_done(ac->req, NULL, NULL, ret);
 	}
@@ -368,6 +371,7 @@ static int local_password_modify(struct ldb_module *module, struct ldb_request *
 				req->controls,
 				ac, lpdb_modify_callabck,
 				req);
+	LDB_REQ_SET_LOCATION(remote_req);
 	if (ret != LDB_SUCCESS) {
 		return ret;
 	}
@@ -414,6 +418,7 @@ static int lpdb_modify_callabck(struct ldb_request *req,
 				   NULL,
 				   ac, lpdb_mod_search_callback,
 				   ac->req);
+	LDB_REQ_SET_LOCATION(search_req);
 	if (ret != LDB_SUCCESS) {
 		return ldb_module_done(ac->req, NULL, NULL,
 					LDB_ERR_OPERATIONS_ERROR);
@@ -522,6 +527,7 @@ static int lpdb_mod_search_callback(struct ldb_request *req,
 					NULL,
 					ac, lpdb_local_callback,
 					ac->req);
+		LDB_REQ_SET_LOCATION(local_req);
 		if (ret != LDB_SUCCESS) {
 			return ldb_module_done(ac->req, NULL, NULL, ret);
 		}
@@ -579,6 +585,7 @@ static int local_password_delete(struct ldb_module *module,
 				req->controls,
 				ac, lpdb_delete_callabck,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list