summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-02-12 11:20:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:03 -0500
commit5a61821e7e89edea47dbc8b55c9579061d186f07 (patch)
treec5955b47594f9a76df6a4c9a80c608929a30eba9
parent9e4a5cbe292865fe3067eb7e20a0875e5ff8d207 (diff)
downloadsamba-5a61821e7e89edea47dbc8b55c9579061d186f07.tar.gz
samba-5a61821e7e89edea47dbc8b55c9579061d186f07.tar.bz2
samba-5a61821e7e89edea47dbc8b55c9579061d186f07.zip
r21295: pass down the gensec session key to the store_chunk hook
metze (This used to be commit 91de9591732aab822f2a44c4a6698edce48f723b)
-rw-r--r--source4/libnet/libnet_become_dc.c13
-rw-r--r--source4/libnet/libnet_become_dc.h1
2 files changed, 11 insertions, 3 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index a302ded4f5..9f54fa646f 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -1716,6 +1716,8 @@ static void becomeDC_drsuapi_pull_partition_send(struct libnet_BecomeDC_state *s
}
static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state *s,
+ struct becomeDC_drsuapi *drsuapi_h,
+ struct becomeDC_drsuapi *drsuapi_p,
struct libnet_BecomeDC_Partition *partition,
struct drsuapi_DsGetNCChanges *r)
{
@@ -1776,6 +1778,11 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
s->_sc.ctr_level = ctr_level;
s->_sc.ctr1 = ctr1;
s->_sc.ctr6 = ctr6;
+ /*
+ * we need to use the drsuapi_p->gensec_skey here,
+ * when we use drsuapi_p->pipe in the for this request
+ */
+ s->_sc.gensec_skey = &drsuapi_h->gensec_skey;
nt_status = partition->store_chunk(s->callbacks.private_data, &s->_sc);
if (!NT_STATUS_IS_OK(nt_status)) {
@@ -1832,7 +1839,7 @@ static void becomeDC_drsuapi3_pull_schema_recv(struct rpc_request *req)
NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
}
- status = becomeDC_drsuapi_pull_partition_recv(s, &s->schema_part, r);
+ status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, &s->drsuapi3, &s->schema_part, r);
if (!W_ERROR_IS_OK(status)) {
composite_error(c, werror_to_ntstatus(status));
return;
@@ -1894,7 +1901,7 @@ static void becomeDC_drsuapi3_pull_config_recv(struct rpc_request *req)
NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
}
- status = becomeDC_drsuapi_pull_partition_recv(s, &s->config_part, r);
+ status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, &s->drsuapi3, &s->config_part, r);
if (!W_ERROR_IS_OK(status)) {
composite_error(c, werror_to_ntstatus(status));
return;
@@ -1961,7 +1968,7 @@ static void becomeDC_drsuapi3_pull_domain_recv(struct rpc_request *req)
NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
}
- status = becomeDC_drsuapi_pull_partition_recv(s, &s->domain_part, r);
+ status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, &s->drsuapi3, &s->domain_part, r);
if (!W_ERROR_IS_OK(status)) {
composite_error(c, werror_to_ntstatus(status));
return;
diff --git a/source4/libnet/libnet_become_dc.h b/source4/libnet/libnet_become_dc.h
index 1ddf2a3073..c6dfd1c179 100644
--- a/source4/libnet/libnet_become_dc.h
+++ b/source4/libnet/libnet_become_dc.h
@@ -110,6 +110,7 @@ struct libnet_BecomeDC_StoreChunk {
uint32_t ctr_level;
const struct drsuapi_DsGetNCChangesCtr1 *ctr1;
const struct drsuapi_DsGetNCChangesCtr6 *ctr6;
+ const DATA_BLOB *gensec_skey;
};
struct libnet_BecomeDC_Callbacks {