mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s4/drs: drsuapi_DsAddEntry_ErrData propagate structure def in source code
This commit is contained in:
parent
7b4341637c
commit
00fce797e8
@ -2288,33 +2288,33 @@ static void becomeDC_drsuapi1_add_entry_recv(struct tevent_req *subreq)
|
||||
if (r->out.ctr->ctr3.count != 1) {
|
||||
WERROR status;
|
||||
|
||||
if (r->out.ctr->ctr3.level != 1) {
|
||||
if (r->out.ctr->ctr3.err_ver != 1) {
|
||||
composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!r->out.ctr->ctr3.error) {
|
||||
if (!r->out.ctr->ctr3.err_data) {
|
||||
composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
|
||||
return;
|
||||
}
|
||||
|
||||
status = r->out.ctr->ctr3.error->info1.status;
|
||||
status = r->out.ctr->ctr3.err_data->v1.status;
|
||||
|
||||
if (!r->out.ctr->ctr3.error->info1.info) {
|
||||
if (!r->out.ctr->ctr3.err_data->v1.info) {
|
||||
composite_error(c, werror_to_ntstatus(status));
|
||||
return;
|
||||
}
|
||||
|
||||
/* see if we can get a more detailed error */
|
||||
switch (r->out.ctr->ctr3.error->info1.level) {
|
||||
switch (r->out.ctr->ctr3.err_data->v1.dir_err) {
|
||||
case 1:
|
||||
status = r->out.ctr->ctr3.error->info1.info->error1.status;
|
||||
status = r->out.ctr->ctr3.err_data->v1.info->error1.status;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
status = r->out.ctr->ctr3.error->info1.info->errorX.extended_err;
|
||||
status = r->out.ctr->ctr3.err_data->v1.info->errorX.extended_err;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -165,8 +165,8 @@ WERROR dcesrv_drsuapi_DsAddEntry(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
||||
|
||||
ZERO_STRUCTP(r->out.ctr);
|
||||
*r->out.level_out = 3;
|
||||
r->out.ctr->ctr3.level = 1;
|
||||
r->out.ctr->ctr3.error = talloc_zero(mem_ctx, union drsuapi_DsAddEntryError);
|
||||
r->out.ctr->ctr3.err_ver = 1;
|
||||
r->out.ctr->ctr3.err_data = talloc_zero(mem_ctx, union drsuapi_DsAddEntry_ErrData);
|
||||
|
||||
DCESRV_PULL_HANDLE_WERR(h, r->in.bind_handle, DRSUAPI_BIND_HANDLE);
|
||||
b_state = h->data;
|
||||
@ -192,7 +192,7 @@ WERROR dcesrv_drsuapi_DsAddEntry(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
||||
&num,
|
||||
&ids);
|
||||
if (!W_ERROR_IS_OK(status)) {
|
||||
r->out.ctr->ctr3.error->info1.status = status;
|
||||
r->out.ctr->ctr3.err_data->v1.status = status;
|
||||
ldb_transaction_cancel(b_state->sam_ctx);
|
||||
DEBUG(0,(__location__ ": DsAddEntry failed - %s\n", win_errstr(status)));
|
||||
return status;
|
||||
@ -211,7 +211,7 @@ WERROR dcesrv_drsuapi_DsAddEntry(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
||||
*/
|
||||
status = drsuapi_add_SPNs(b_state, dce_call, mem_ctx, first_object);
|
||||
if (!W_ERROR_IS_OK(status)) {
|
||||
r->out.ctr->ctr3.error->info1.status = status;
|
||||
r->out.ctr->ctr3.err_data->v1.status = status;
|
||||
ldb_transaction_cancel(b_state->sam_ctx);
|
||||
DEBUG(0,(__location__ ": DsAddEntry add SPNs failed - %s\n", win_errstr(status)));
|
||||
return status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user