From 0f98b9948389c6662d484646b4a2aeee199e9431 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 17 Jul 2008 13:04:04 +0200 Subject: dssync: record the bind info in the new remote_info28 in libnet_dssync_bind(). This extracts the info24 data in case this is what was returned (instead of info28). E.g. windows 2000 returns info24. Michael (This used to be commit 61b41aa615d5d46305653845584df7b1803f07ec) --- source3/libnet/libnet_dssync.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'source3/libnet/libnet_dssync.c') diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index 9801ec76d0..35f420c901 100644 --- a/source3/libnet/libnet_dssync.c +++ b/source3/libnet/libnet_dssync.c @@ -241,6 +241,35 @@ static NTSTATUS libnet_dssync_bind(TALLOC_CTX *mem_ctx, return werror_to_ntstatus(werr); } + ZERO_STRUCT(ctx->remote_info28); + switch (bind_info.length) { + case 24: { + struct drsuapi_DsBindInfo24 *info24; + info24 = &bind_info.info.info24; + ctx->remote_info28.site_guid = info24->site_guid; + ctx->remote_info28.supported_extensions = info24->supported_extensions; + ctx->remote_info28.pid = info24->pid; + ctx->remote_info28.repl_epoch = 0; + break; + } + case 28: + ctx->remote_info28 = bind_info.info.info28; + break; + case 48: { + struct drsuapi_DsBindInfo48 *info48; + info48 = &bind_info.info.info48; + ctx->remote_info28.site_guid = info48->site_guid; + ctx->remote_info28.supported_extensions = info48->supported_extensions; + ctx->remote_info28.pid = info48->pid; + ctx->remote_info28.repl_epoch = info48->repl_epoch; + break; + } + default: + DEBUG(1, ("Warning: invalid info length in bind info: %d\n", + bind_info.length)); + break; + } + return status; } -- cgit