mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4:rpc_server: return the context_id of a FAULT in a same way as windows
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
077df7f08a
commit
505a1fdf0d
@ -112,22 +112,10 @@ NTSTATUS dcesrv_fault_with_flags(struct dcesrv_call_state *call,
|
|||||||
pkt.ptype = DCERPC_PKT_FAULT;
|
pkt.ptype = DCERPC_PKT_FAULT;
|
||||||
pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST | extra_flags;
|
pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST | extra_flags;
|
||||||
pkt.u.fault.alloc_hint = 24;
|
pkt.u.fault.alloc_hint = 24;
|
||||||
switch (call->pkt.ptype) {
|
if (call->context != NULL) {
|
||||||
case DCERPC_PKT_REQUEST:
|
pkt.u.fault.context_id = call->context->context_id;
|
||||||
pkt.u.fault.context_id = call->pkt.u.request.context_id;
|
} else {
|
||||||
break;
|
|
||||||
default:
|
|
||||||
pkt.u.fault.context_id = 0;
|
pkt.u.fault.context_id = 0;
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch (fault_code) {
|
|
||||||
case DCERPC_NCA_S_PROTO_ERROR:
|
|
||||||
case DCERPC_NCA_S_UNKNOWN_IF:
|
|
||||||
/*
|
|
||||||
* context_id = 0 is forced on protocol errors.
|
|
||||||
*/
|
|
||||||
pkt.u.fault.context_id = 0;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
pkt.u.fault.cancel_count = 0;
|
pkt.u.fault.cancel_count = 0;
|
||||||
pkt.u.fault.flags = 0;
|
pkt.u.fault.flags = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user