LATER STEP?? source4/rpc_server/remote/dcesrv_remote.c map from NTSTATUS to fault_state
authorStefan Metzmacher <metze@samba.org>
Wed, 22 Jan 2014 12:10:26 +0000 (13:10 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jun 2019 10:45:39 +0000 (12:45 +0200)
source4/rpc_server/remote/dcesrv_remote.c

index d34643a68db3714d4df817caf282dd6585268416..5d23cd22417dacb9d439a8f180eb5d438b60d935 100644 (file)
@@ -353,6 +353,7 @@ static void remote_op_dispatch_done(struct tevent_req *subreq)
        const struct ndr_interface_call *call;
        const char *name;
        NTSTATUS status;
+       WERROR werr;
 
        name = table->calls[opnum].name;
        call = &table->calls[opnum];
@@ -361,7 +362,10 @@ static void remote_op_dispatch_done(struct tevent_req *subreq)
        status = dcerpc_binding_handle_call_recv(subreq);
        TALLOC_FREE(subreq);
 
-       dce_call->fault_code = priv->c_pipe->last_fault_code;
+       werr = ntstatus_to_werror(status);
+
+       /* TODO add a better mapping */
+       dce_call->fault_code = W_ERROR_V(werr);
        if (dce_call->fault_code != 0) {
                DEBUG(0,("dcesrv_remote: call[%s] failed with: %s!\n",
                        name, dcerpc_errstr(dce_call, dce_call->fault_code)));