mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
drsuapi: fix samba4 callers after drsuapi.idl changes
metze
(This used to be commit 4b054cee51
)
This commit is contained in:
parent
9d0db64d24
commit
75f594b285
@ -314,27 +314,35 @@ static void dreplsrv_op_pull_source_get_changes_recv(struct rpc_request *req)
|
||||
if (*r->out.level == 1) {
|
||||
ctr_level = 1;
|
||||
ctr1 = &r->out.ctr.ctr1;
|
||||
} else if (*r->out.level == 2) {
|
||||
} else if (*r->out.level == 2 &&
|
||||
r->out.ctr.ctr2.mszip1.ts) {
|
||||
ctr_level = 1;
|
||||
ctr1 = r->out.ctr.ctr2.mszip1.ctr1;
|
||||
ctr1 = &r->out.ctr.ctr2.mszip1.ts->ctr1;
|
||||
} else if (*r->out.level == 6) {
|
||||
ctr_level = 6;
|
||||
ctr6 = &r->out.ctr.ctr6;
|
||||
} else if (*r->out.level == 7 &&
|
||||
r->out.ctr.ctr7.level == 6 &&
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
|
||||
r->out.ctr.ctr7.ctr.mszip6.ts) {
|
||||
ctr_level = 6;
|
||||
ctr6 = r->out.ctr.ctr7.ctr.mszip6.ctr6;
|
||||
ctr6 = &r->out.ctr.ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (*r->out.level == 7 &&
|
||||
r->out.ctr.ctr7.level == 6 &&
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS) {
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
|
||||
r->out.ctr.ctr7.ctr.xpress6.ts) {
|
||||
ctr_level = 6;
|
||||
ctr6 = r->out.ctr.ctr7.ctr.xpress6.ctr6;
|
||||
ctr6 = &r->out.ctr.ctr7.ctr.xpress6.ts->ctr6;
|
||||
} else {
|
||||
composite_error(c, werror_to_ntstatus(WERR_BAD_NET_RESP));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ctr1 && !ctr6) {
|
||||
composite_error(c, werror_to_ntstatus(WERR_BAD_NET_RESP));
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctr_level == 6) {
|
||||
if (!W_ERROR_IS_OK(ctr6->drs_error)) {
|
||||
composite_error(c, werror_to_ntstatus(ctr6->drs_error));
|
||||
|
@ -2465,26 +2465,33 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
|
||||
if (*r->out.level == 1) {
|
||||
ctr_level = 1;
|
||||
ctr1 = &r->out.ctr.ctr1;
|
||||
} else if (*r->out.level == 2) {
|
||||
} else if (*r->out.level == 2 &&
|
||||
r->out.ctr.ctr2.mszip1.ts) {
|
||||
ctr_level = 1;
|
||||
ctr1 = r->out.ctr.ctr2.mszip1.ctr1;
|
||||
ctr1 = &r->out.ctr.ctr2.mszip1.ts->ctr1;
|
||||
} else if (*r->out.level == 6) {
|
||||
ctr_level = 6;
|
||||
ctr6 = &r->out.ctr.ctr6;
|
||||
} else if (*r->out.level == 7 &&
|
||||
r->out.ctr.ctr7.level == 6 &&
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
|
||||
r->out.ctr.ctr7.ctr.mszip6.ts) {
|
||||
ctr_level = 6;
|
||||
ctr6 = r->out.ctr.ctr7.ctr.mszip6.ctr6;
|
||||
ctr6 = &r->out.ctr.ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (*r->out.level == 7 &&
|
||||
r->out.ctr.ctr7.level == 6 &&
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS) {
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
|
||||
r->out.ctr.ctr7.ctr.xpress6.ts) {
|
||||
ctr_level = 6;
|
||||
ctr6 = r->out.ctr.ctr7.ctr.xpress6.ctr6;
|
||||
ctr6 = &r->out.ctr.ctr7.ctr.xpress6.ts->ctr6;
|
||||
} else {
|
||||
return WERR_BAD_NET_RESP;
|
||||
}
|
||||
|
||||
if (!ctr1 && ! ctr6) {
|
||||
return WERR_BAD_NET_RESP;
|
||||
}
|
||||
|
||||
if (ctr_level == 6) {
|
||||
if (!W_ERROR_IS_OK(ctr6->drs_error)) {
|
||||
return ctr6->drs_error;
|
||||
|
@ -747,9 +747,10 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
if (ret == true && *r.out.level == 1) {
|
||||
out_level = 1;
|
||||
ctr1 = &r.out.ctr.ctr1;
|
||||
} else if (ret == true && *r.out.level == 2) {
|
||||
} else if (ret == true && *r.out.level == 2 &&
|
||||
r.out.ctr.ctr2.mszip1.ts) {
|
||||
out_level = 1;
|
||||
ctr1 = r.out.ctr.ctr2.mszip1.ctr1;
|
||||
ctr1 = &r.out.ctr.ctr2.mszip1.ts->ctr1;
|
||||
}
|
||||
|
||||
if (out_level == 1) {
|
||||
@ -770,14 +771,16 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
ctr6 = &r.out.ctr.ctr6;
|
||||
} else if (ret == true && *r.out.level == 7
|
||||
&& r.out.ctr.ctr7.level == 6
|
||||
&& r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
|
||||
&& r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP
|
||||
&& r.out.ctr.ctr7.ctr.mszip6.ts) {
|
||||
out_level = 6;
|
||||
ctr6 = r.out.ctr.ctr7.ctr.mszip6.ctr6;
|
||||
ctr6 = &r.out.ctr.ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (ret == true && *r.out.level == 7
|
||||
&& r.out.ctr.ctr7.level == 6
|
||||
&& r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS) {
|
||||
&& r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS
|
||||
&& r.out.ctr.ctr7.ctr.xpress6.ts) {
|
||||
out_level = 6;
|
||||
ctr6 = r.out.ctr.ctr7.ctr.xpress6.ctr6;
|
||||
ctr6 = &r.out.ctr.ctr7.ctr.xpress6.ts->ctr6;
|
||||
}
|
||||
|
||||
if (out_level == 6) {
|
||||
|
Loading…
Reference in New Issue
Block a user