librpc/dcesrv_core: make use of dcerpc_fault_to_nt_status() in dcesrv_call_dispatch_l...
authorStefan Metzmacher <metze@samba.org>
Fri, 23 Oct 2020 09:52:57 +0000 (11:52 +0200)
committerSamuel Cabrero <scabrero@sn-devel-184>
Fri, 23 Oct 2020 16:02:37 +0000 (16:02 +0000)
The caller wants to get a useful NTSTATUS instead of a generic
NT_STATUS_NET_WRITE_FAULT.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14551

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
librpc/rpc/dcesrv_core.c

index d39dbb4368776a412b9e6563e645dfa211be64fe..783d75d5bfe3e84aebd3d3e3bba9371d0fa61cd2 100644 (file)
@@ -2996,7 +2996,7 @@ _PUBLIC_ NTSTATUS dcesrv_call_dispatch_local(struct dcesrv_call_state *call)
                        call->context->iface->name,
                        call->pkt.u.request.opnum,
                        dcerpc_errstr(call, call->fault_code));
-               return status;
+               return dcerpc_fault_to_nt_status(call->fault_code);
        }
 
        status = call->context->iface->local(call, call, call->r);
@@ -3005,7 +3005,7 @@ _PUBLIC_ NTSTATUS dcesrv_call_dispatch_local(struct dcesrv_call_state *call)
                        call->context->iface->name,
                        call->pkt.u.request.opnum,
                        dcerpc_errstr(call, call->fault_code));
-               return status;
+               return dcerpc_fault_to_nt_status(call->fault_code);
        }
 
        push = ndr_push_init_ctx(call);
@@ -3021,7 +3021,7 @@ _PUBLIC_ NTSTATUS dcesrv_call_dispatch_local(struct dcesrv_call_state *call)
                        call->context->iface->name,
                        call->pkt.u.request.opnum,
                        dcerpc_errstr(call, call->fault_code));
-               return status;
+               return dcerpc_fault_to_nt_status(call->fault_code);
        }
 
        rep = talloc_zero(call, struct data_blob_list_item);