summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-07 06:41:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:57 -0500
commit553e339f0db251a926b6f5d78167fbcc3564e568 (patch)
tree33cee6b4f2baf8d4aff5c5ca0fea0be5581223b0 /source4/libnet
parent6300221b6c9b3127251c5909451de0bc62b4a01d (diff)
downloadsamba-553e339f0db251a926b6f5d78167fbcc3564e568.tar.gz
samba-553e339f0db251a926b6f5d78167fbcc3564e568.tar.bz2
samba-553e339f0db251a926b6f5d78167fbcc3564e568.zip
r20061: use a DsBindInfo28 structure
metze (This used to be commit e8c14577976ccb718eb887b0d63b3ba75de00d47)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_unbecome_dc.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index b84b4d9ff5..bc29501ac4 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -49,6 +49,9 @@ struct libnet_UnbecomeDC_state {
struct dcerpc_pipe *pipe;
struct drsuapi_DsBind bind_r;
struct GUID bind_guid;
+ struct drsuapi_DsBindInfoCtr bind_info_ctr;
+ struct drsuapi_DsBindInfo28 local_info28;
+ struct drsuapi_DsBindInfo28 remote_info28;
struct policy_handle bind_handle;
struct drsuapi_DsRemoveDSServer rm_ds_srv_r;
} drsuapi;
@@ -397,11 +400,21 @@ static void unbecomeDC_drsuapi_bind_send(struct libnet_UnbecomeDC_state *s)
{
struct composite_context *c = s->creq;
struct rpc_request *req;
+ struct drsuapi_DsBindInfo28 *bind_info28;
GUID_from_string(DRSUAPI_DS_BIND_GUID, &s->drsuapi.bind_guid);
+ bind_info28 = &s->drsuapi.local_info28;
+ bind_info28->supported_extensions = 0;
+ bind_info28->site_guid = GUID_zero();
+ bind_info28->u1 = 508;
+ bind_info28->repl_epoch = 0;
+
+ s->drsuapi.bind_info_ctr.length = 28;
+ s->drsuapi.bind_info_ctr.info.info28 = *bind_info28;
+
s->drsuapi.bind_r.in.bind_guid = &s->drsuapi.bind_guid;
- s->drsuapi.bind_r.in.bind_info = NULL;
+ s->drsuapi.bind_r.in.bind_info = &s->drsuapi.bind_info_ctr;
s->drsuapi.bind_r.out.bind_handle = &s->drsuapi.bind_handle;
req = dcerpc_drsuapi_DsBind_send(s->drsuapi.pipe, s, &s->drsuapi.bind_r);
@@ -424,6 +437,24 @@ static void unbecomeDC_drsuapi_bind_recv(struct rpc_request *req)
return;
}
+ ZERO_STRUCT(s->drsuapi.remote_info28);
+ if (s->drsuapi.bind_r.out.bind_info) {
+ switch (s->drsuapi.bind_r.out.bind_info->length) {
+ case 24: {
+ struct drsuapi_DsBindInfo24 *info24;
+ info24 = &s->drsuapi.bind_r.out.bind_info->info.info24;
+ s->drsuapi.remote_info28.supported_extensions = info24->supported_extensions;
+ s->drsuapi.remote_info28.site_guid = info24->site_guid;
+ s->drsuapi.remote_info28.u1 = info24->u1;
+ s->drsuapi.remote_info28.repl_epoch = 0;
+ break;
+ }
+ case 28:
+ s->drsuapi.remote_info28 = s->drsuapi.bind_r.out.bind_info->info.info28;
+ break;
+ }
+ }
+
unbecomeDC_drsuapi_remove_ds_server_send(s);
}