diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-08-17 09:07:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:01 -0500 |
commit | 6311e8955e395d267fdc359d1196a158ba3e1cab (patch) | |
tree | 16103322d438c46d66533ba6023ba880e377b0f3 /source4/librpc/rpc | |
parent | 85f12a0ee013675a2dd07d78ba6884fbdb3c17f3 (diff) | |
download | samba-6311e8955e395d267fdc359d1196a158ba3e1cab.tar.gz samba-6311e8955e395d267fdc359d1196a158ba3e1cab.tar.bz2 samba-6311e8955e395d267fdc359d1196a158ba3e1cab.zip |
r1845: map DCERPC_FAULT_LOGON_FAILURE to NT_STATUS_LOGON_FAILURE
metze
(This used to be commit 0cf0c3646038574e73c77a0b7adbdf6d04fe7207)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 13 |
1 files changed, 11 insertions, 2 deletions
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) { |