diff options
Diffstat (limited to 'source3/libnet/libnet_dssync.c')
-rw-r--r-- | source3/libnet/libnet_dssync.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index bae03effed..81866c85ba 100644 --- a/source3/libnet/libnet_dssync.c +++ b/source3/libnet/libnet_dssync.c @@ -297,7 +297,7 @@ static NTSTATUS libnet_dssync_lookup_nc(TALLOC_CTX *mem_ctx, req.req1.count = 1; req.req1.names = names; req.req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS; - req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_UKNOWN; + req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_UNKNOWN; req.req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779; status = rpccli_drsuapi_DsCrackNames(ctx->cli, mem_ctx, @@ -539,17 +539,24 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx, if (level_out == 1) { out_level = 1; ctr1 = &ctr.ctr1; - } else if (level_out == 2) { + } else if (level_out == 2 && ctr.ctr2.mszip1.ts) { out_level = 1; - ctr1 = ctr.ctr2.ctr.mszip1.ctr1; + ctr1 = &ctr.ctr2.mszip1.ts->ctr1; } else if (level_out == 6) { out_level = 6; ctr6 = &ctr.ctr6; } else if (level_out == 7 && ctr.ctr7.level == 6 - && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) { + && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP + && ctr.ctr7.ctr.mszip6.ts) { out_level = 6; - ctr6 = ctr.ctr7.ctr.mszip6.ctr6; + ctr6 = &ctr.ctr7.ctr.mszip6.ts->ctr6; + } else if (level_out == 7 + && ctr.ctr7.level == 6 + && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS + && ctr.ctr7.ctr.xpress6.ts) { + out_level = 6; + ctr6 = &ctr.ctr7.ctr.xpress6.ts->ctr6; } if (out_level == 1) { |