summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2012-11-01 13:42:52 +1100
committerAndrew Tridgell <tridge@samba.org>2012-11-01 15:40:41 +1100
commitb0cc0d5698d34aa7956b22faa8b79bd9b338286d (patch)
treeb4c9613c83da0cf51c3bcf032db09d48d829c4cd /source4/librpc
parent538dd046f1efefbeb8660ef1ff5afd594a003341 (diff)
downloadsamba-b0cc0d5698d34aa7956b22faa8b79bd9b338286d.tar.gz
samba-b0cc0d5698d34aa7956b22faa8b79bd9b338286d.tar.bz2
samba-b0cc0d5698d34aa7956b22faa8b79bd9b338286d.zip
s4-librpc: set error code to LOGON_FAILURE on RPC fault with access denied
this allows the client code to trigger a retry with a new password callback for NTLM connections Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 4440395e94..e653cbaea6 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -2148,8 +2148,13 @@ static void dcerpc_alter_context_recv_handler(struct rpc_request *subreq,
if (pkt->ptype == DCERPC_PKT_FAULT) {
DEBUG(5,("dcerpc: alter_resp - rpc fault: %s\n",
dcerpc_errstr(state, pkt->u.fault.status)));
- state->p->last_fault_code = pkt->u.fault.status;
- tevent_req_nterror(req, NT_STATUS_NET_WRITE_FAULT);
+ if (pkt->u.fault.status == DCERPC_FAULT_ACCESS_DENIED) {
+ state->p->last_fault_code = pkt->u.fault.status;
+ tevent_req_nterror(req, NT_STATUS_LOGON_FAILURE);
+ } else {
+ state->p->last_fault_code = pkt->u.fault.status;
+ tevent_req_nterror(req, NT_STATUS_NET_WRITE_FAULT);
+ }
return;
}