summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-02-12 10:58:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:02 -0500
commitc672e06cd566241c2d6d6a9b06b127c3d6a32c35 (patch)
tree8dfd6a8ba983847bfa367b55e5c52a842e0f9ed8 /source4/libnet
parent78eb31a8f075cac813cdd76f1f042462b0b47543 (diff)
downloadsamba-c672e06cd566241c2d6d6a9b06b127c3d6a32c35.tar.gz
samba-c672e06cd566241c2d6d6a9b06b127c3d6a32c35.tar.bz2
samba-c672e06cd566241c2d6d6a9b06b127c3d6a32c35.zip
r21293: store the gensec session key for each drsuapi connection
metze (This used to be commit d399739820650bcbe486956374af84c436d3ec16)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_become_dc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index aa4e2287bc..a302ded4f5 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -32,6 +32,7 @@
#include "librpc/gen_ndr/ndr_misc.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_drsuapi.h"
+#include "auth/gensec/gensec.h"
struct libnet_BecomeDC_state {
struct composite_context *creq;
@@ -55,6 +56,7 @@ struct libnet_BecomeDC_state {
struct libnet_BecomeDC_state *s;
struct dcerpc_binding *binding;
struct dcerpc_pipe *pipe;
+ DATA_BLOB gensec_skey;
struct drsuapi_DsBind bind_r;
struct GUID bind_guid;
struct drsuapi_DsBindInfoCtr bind_info_ctr;
@@ -895,6 +897,10 @@ static void becomeDC_drsuapi1_connect_recv(struct composite_context *req)
c->status = dcerpc_pipe_connect_b_recv(req, s, &s->drsuapi1.pipe);
if (!composite_is_ok(c)) return;
+ c->status = gensec_session_key(s->drsuapi1.pipe->conn->security_state.generic_state,
+ &s->drsuapi1.gensec_skey);
+ if (!composite_is_ok(c)) return;
+
becomeDC_drsuapi_bind_send(s, &s->drsuapi1, becomeDC_drsuapi1_bind_recv);
}
@@ -1585,6 +1591,10 @@ static void becomeDC_drsuapi2_connect_recv(struct composite_context *req)
c->status = dcerpc_pipe_connect_b_recv(req, s, &s->drsuapi2.pipe);
if (!composite_is_ok(c)) return;
+ c->status = gensec_session_key(s->drsuapi2.pipe->conn->security_state.generic_state,
+ &s->drsuapi2.gensec_skey);
+ if (!composite_is_ok(c)) return;
+
becomeDC_drsuapi_bind_send(s, &s->drsuapi2, becomeDC_drsuapi2_bind_recv);
}
@@ -1639,6 +1649,10 @@ static void becomeDC_drsuapi3_connect_recv(struct composite_context *req)
c->status = dcerpc_pipe_connect_b_recv(req, s, &s->drsuapi3.pipe);
if (!composite_is_ok(c)) return;
+ c->status = gensec_session_key(s->drsuapi3.pipe->conn->security_state.generic_state,
+ &s->drsuapi3.gensec_skey);
+ if (!composite_is_ok(c)) return;
+
becomeDC_drsuapi3_pull_schema_send(s);
}