1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s4:librpc/rpc: correctly initialize last_fault_code for bind and alter_context requests

metze
This commit is contained in:
Stefan Metzmacher 2010-04-09 13:27:07 +02:00
parent 718a804613
commit e95e2e8262

View File

@ -611,6 +611,7 @@ static void dcerpc_bind_recv_handler(struct rpc_request *req,
if ((pkt->ptype != DCERPC_PKT_BIND_ACK) ||
(pkt->u.bind_ack.num_results == 0) ||
(pkt->u.bind_ack.ctx_list[0].result != 0)) {
req->p->last_fault_code = DCERPC_NCA_S_PROTO_ERROR;
composite_error(c, NT_STATUS_NET_WRITE_FAULT);
return;
}
@ -1584,9 +1585,17 @@ static void dcerpc_alter_recv_handler(struct rpc_request *req,
return;
}
if (pkt->ptype == DCERPC_PKT_FAULT) {
DEBUG(5,("rpc fault: %s\n", dcerpc_errstr(c, pkt->u.fault.status)));
recv_pipe->last_fault_code = pkt->u.fault.status;
composite_error(c, NT_STATUS_NET_WRITE_FAULT);
return;
}
if (pkt->ptype != DCERPC_PKT_ALTER_RESP ||
pkt->u.alter_resp.num_results == 0 ||
pkt->u.alter_resp.ctx_list[0].result != 0) {
recv_pipe->last_fault_code = DCERPC_NCA_S_PROTO_ERROR;
composite_error(c, NT_STATUS_NET_WRITE_FAULT);
return;
}