summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-07-17 13:04:04 +0200
committerMichael Adam <obnox@samba.org>2008-08-01 16:04:41 +0200
commit0f98b9948389c6662d484646b4a2aeee199e9431 (patch)
tree2edc579eec5ae071eea4169bbbe43e01d10e476f /source3/libnet
parent55b2d50926e0d779193a380a5aa67dc7e57f1d7e (diff)
downloadsamba-0f98b9948389c6662d484646b4a2aeee199e9431.tar.gz
samba-0f98b9948389c6662d484646b4a2aeee199e9431.tar.bz2
samba-0f98b9948389c6662d484646b4a2aeee199e9431.zip
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)
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_dssync.c29
1 files changed, 29 insertions, 0 deletions
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;
}