diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/pidl/server.pm | 2 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/source4/build/pidl/server.pm b/source4/build/pidl/server.pm index 2c590ea642..aa44d9cbb2 100644 --- a/source4/build/pidl/server.pm +++ b/source4/build/pidl/server.pm @@ -102,7 +102,7 @@ pidl " } if (dce_call->fault_code != 0) { - return NT_STATUS_NET_WRITE_FAULT; + return dcerpc_map_fault2ntstatus(dce_call->fault_code); } return NT_STATUS_OK; } diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 408ac3e27e..edd0469d6e 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -95,6 +95,15 @@ void dcerpc_set_auth_length(DATA_BLOB *blob, uint16_t v) } } +NTSTATUS dcerpc_map_fault2ntstatus(uint32_t fault_code) +{ + switch (fault_code) { + case DCERPC_FAULT_LOGON_FAILURE: + return NT_STATUS_LOGON_FAILURE; + } + + return NT_STATUS_NET_WRITE_FAULT; +} /* parse a data blob into a dcerpc_packet structure. This handles both @@ -617,7 +626,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p, if (pkt.ptype == DCERPC_PKT_FAULT) { DEBUG(5,("rpc fault 0x%x\n", pkt.u.fault.status)); p->last_fault_code = pkt.u.fault.status; - return NT_STATUS_NET_WRITE_FAULT; + return dcerpc_map_fault2ntstatus(pkt.u.fault.status); } if (pkt.ptype != DCERPC_PKT_RESPONSE) { @@ -652,7 +661,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p, if (pkt.ptype == DCERPC_PKT_FAULT) { p->last_fault_code = pkt.u.fault.status; - return NT_STATUS_NET_WRITE_FAULT; + return dcerpc_map_fault2ntstatus(pkt.u.fault.status); } if (pkt.ptype != DCERPC_PKT_RESPONSE) { |