diff options
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 30 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 58 |
2 files changed, 44 insertions, 44 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 040831c98f..1bd170f901 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -84,11 +84,11 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p) memset((char *)&hdr_resp, '\0', sizeof(hdr_resp)); /* Change the incoming request header to a response. */ - p->hdr.pkt_type = RPC_RESPONSE; + p->hdr.pkt_type = DCERPC_PKT_RESPONSE; /* Set up rpc header flags. */ if (p->out_data.data_sent_length == 0) { - p->hdr.flags = RPC_FLG_FIRST; + p->hdr.flags = DCERPC_PFC_FLAG_FIRST; } else { p->hdr.flags = 0; } @@ -130,7 +130,7 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p) */ if(p->out_data.data_sent_length + data_len >= prs_offset(&p->out_data.rdata)) { - p->hdr.flags |= RPC_FLG_LAST; + p->hdr.flags |= DCERPC_PFC_FLAG_LAST; if (data_len_left % 8) { ss_padding_len = 8 - (data_len_left % 8); DEBUG(10,("create_next_pdu_ntlmssp: adding sign/seal padding of %u\n", @@ -302,11 +302,11 @@ static bool create_next_pdu_schannel(pipes_struct *p) memset((char *)&hdr_resp, '\0', sizeof(hdr_resp)); /* Change the incoming request header to a response. */ - p->hdr.pkt_type = RPC_RESPONSE; + p->hdr.pkt_type = DCERPC_PKT_RESPONSE; /* Set up rpc header flags. */ if (p->out_data.data_sent_length == 0) { - p->hdr.flags = RPC_FLG_FIRST; + p->hdr.flags = DCERPC_PFC_FLAG_FIRST; } else { p->hdr.flags = 0; } @@ -349,7 +349,7 @@ static bool create_next_pdu_schannel(pipes_struct *p) */ if(p->out_data.data_sent_length + data_len >= prs_offset(&p->out_data.rdata)) { - p->hdr.flags |= RPC_FLG_LAST; + p->hdr.flags |= DCERPC_PFC_FLAG_LAST; if (data_len_left % 8) { ss_padding_len = 8 - (data_len_left % 8); DEBUG(10,("create_next_pdu_schannel: adding sign/seal padding of %u\n", @@ -501,11 +501,11 @@ static bool create_next_pdu_noauth(pipes_struct *p) memset((char *)&hdr_resp, '\0', sizeof(hdr_resp)); /* Change the incoming request header to a response. */ - p->hdr.pkt_type = RPC_RESPONSE; + p->hdr.pkt_type = DCERPC_PKT_RESPONSE; /* Set up rpc header flags. */ if (p->out_data.data_sent_length == 0) { - p->hdr.flags = RPC_FLG_FIRST; + p->hdr.flags = DCERPC_PFC_FLAG_FIRST; } else { p->hdr.flags = 0; } @@ -547,7 +547,7 @@ static bool create_next_pdu_noauth(pipes_struct *p) */ if(p->out_data.data_sent_length + data_len >= prs_offset(&p->out_data.rdata)) { - p->hdr.flags |= RPC_FLG_LAST; + p->hdr.flags |= DCERPC_PFC_FLAG_LAST; } /* @@ -826,7 +826,7 @@ static bool setup_bind_nak(pipes_struct *p) * Initialize a bind_nak header. */ - init_rpc_hdr(&nak_hdr, RPC_BINDNACK, RPC_FLG_FIRST | RPC_FLG_LAST, + init_rpc_hdr(&nak_hdr, DCERPC_PKT_BIND_NAK, DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST, p->hdr.call_id, RPC_HEADER_LEN + sizeof(uint16), 0); /* @@ -886,7 +886,7 @@ bool setup_fault_pdu(pipes_struct *p, NTSTATUS status) * Initialize a fault header. */ - init_rpc_hdr(&fault_hdr, RPC_FAULT, RPC_FLG_FIRST | RPC_FLG_LAST | RPC_FLG_NOCALL, + init_rpc_hdr(&fault_hdr, DCERPC_PKT_FAULT, DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST | DCERPC_PFC_FLAG_DID_NOT_EXECUTE, p->hdr.call_id, RPC_HEADER_LEN + RPC_HDR_RESP_LEN + RPC_HDR_FAULT_LEN, 0); /* @@ -953,7 +953,7 @@ bool setup_cancel_ack_reply(pipes_struct *p, prs_struct *rpc_in_p) * Initialize a cancel_ack header. */ - init_rpc_hdr(&ack_reply_hdr, RPC_CANCEL_ACK, RPC_FLG_FIRST | RPC_FLG_LAST, + init_rpc_hdr(&ack_reply_hdr, DCERPC_PKT_CANCEL_ACK, DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST, p->hdr.call_id, RPC_HEADER_LEN, 0); /* @@ -1547,7 +1547,7 @@ static bool pipe_ntlmssp_auth_bind(pipes_struct *p, prs_struct *rpc_in_p, DEBUG(10,("pipe_ntlmssp_auth_bind: NTLMSSP auth started\n")); - /* We can't set pipe_bound True yet - we need an RPC_AUTH3 response packet... */ + /* We can't set pipe_bound True yet - we need an DCERPC_PKT_AUTH3 response packet... */ return True; err: @@ -1798,7 +1798,7 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p) auth_len = prs_offset(&out_auth) - RPC_HDR_AUTH_LEN; } - init_rpc_hdr(&p->hdr, RPC_BINDACK, RPC_FLG_FIRST | RPC_FLG_LAST, + init_rpc_hdr(&p->hdr, DCERPC_PKT_BIND_ACK, DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST, p->hdr.call_id, RPC_HEADER_LEN + prs_offset(&out_hdr_ba) + prs_offset(&out_auth), auth_len); @@ -1986,7 +1986,7 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p) auth_len = prs_offset(&out_auth) - RPC_HDR_AUTH_LEN; } - init_rpc_hdr(&p->hdr, RPC_ALTCONTRESP, RPC_FLG_FIRST | RPC_FLG_LAST, + init_rpc_hdr(&p->hdr, DCERPC_PKT_ALTER_RESP, DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST, p->hdr.call_id, RPC_HEADER_LEN + prs_offset(&out_hdr_ba) + prs_offset(&out_auth), auth_len); diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 2f3d7632b0..b13e34be07 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -264,7 +264,7 @@ static ssize_t unmarshall_rpc_header(pipes_struct *p) * AS/U doesn't set FIRST flag in a BIND packet it seems. */ - if ((p->hdr.pkt_type == RPC_REQUEST) && !(p->hdr.flags & RPC_FLG_FIRST)) { + if ((p->hdr.pkt_type == DCERPC_PKT_REQUEST) && !(p->hdr.flags & DCERPC_PFC_FLAG_FIRST)) { /* * Ensure that the FIRST flag is set. If not then we have * a stream missmatch. @@ -444,7 +444,7 @@ static bool process_request_pdu(pipes_struct *p, prs_struct *rpc_in_p) return False; } - if(p->hdr.flags & RPC_FLG_LAST) { + if(p->hdr.flags & DCERPC_PFC_FLAG_LAST) { bool ret = False; /* * Ok - we finally have a complete RPC stream. @@ -534,35 +534,35 @@ static void process_complete_pdu(pipes_struct *p) (unsigned int)p->hdr.pkt_type )); switch (p->hdr.pkt_type) { - case RPC_REQUEST: + case DCERPC_PKT_REQUEST: reply = process_request_pdu(p, &rpc_in); break; - case RPC_PING: /* CL request - ignore... */ + case DCERPC_PKT_PING: /* CL request - ignore... */ DEBUG(0,("process_complete_pdu: Error. Connectionless packet type %u received on pipe %s.\n", (unsigned int)p->hdr.pkt_type, get_pipe_name_from_iface(&p->syntax))); break; - case RPC_RESPONSE: /* No responses here. */ - DEBUG(0,("process_complete_pdu: Error. RPC_RESPONSE received from client on pipe %s.\n", + case DCERPC_PKT_RESPONSE: /* No responses here. */ + DEBUG(0,("process_complete_pdu: Error. DCERPC_PKT_RESPONSE received from client on pipe %s.\n", get_pipe_name_from_iface(&p->syntax))); break; - case RPC_FAULT: - case RPC_WORKING: /* CL request - reply to a ping when a call in process. */ - case RPC_NOCALL: /* CL - server reply to a ping call. */ - case RPC_REJECT: - case RPC_ACK: - case RPC_CL_CANCEL: - case RPC_FACK: - case RPC_CANCEL_ACK: + case DCERPC_PKT_FAULT: + case DCERPC_PKT_WORKING: /* CL request - reply to a ping when a call in process. */ + case DCERPC_PKT_NOCALL: /* CL - server reply to a ping call. */ + case DCERPC_PKT_REJECT: + case DCERPC_PKT_ACK: + case DCERPC_PKT_CL_CANCEL: + case DCERPC_PKT_FACK: + case DCERPC_PKT_CANCEL_ACK: DEBUG(0,("process_complete_pdu: Error. Connectionless packet type %u received on pipe %s.\n", (unsigned int)p->hdr.pkt_type, get_pipe_name_from_iface(&p->syntax))); break; - case RPC_BIND: + case DCERPC_PKT_BIND: /* * We assume that a pipe bind is only in one pdu. */ @@ -571,15 +571,15 @@ static void process_complete_pdu(pipes_struct *p) } break; - case RPC_BINDACK: - case RPC_BINDNACK: - DEBUG(0,("process_complete_pdu: Error. RPC_BINDACK/RPC_BINDNACK packet type %u received on pipe %s.\n", + case DCERPC_PKT_BIND_ACK: + case DCERPC_PKT_BIND_NAK: + DEBUG(0,("process_complete_pdu: Error. DCERPC_PKT_BINDACK/DCERPC_PKT_BINDNACK packet type %u received on pipe %s.\n", (unsigned int)p->hdr.pkt_type, get_pipe_name_from_iface(&p->syntax))); break; - case RPC_ALTCONT: + case DCERPC_PKT_ALTER: /* * We assume that a pipe bind is only in one pdu. */ @@ -588,12 +588,12 @@ static void process_complete_pdu(pipes_struct *p) } break; - case RPC_ALTCONTRESP: - DEBUG(0,("process_complete_pdu: Error. RPC_ALTCONTRESP on pipe %s: Should only be server -> client.\n", + case DCERPC_PKT_ALTER_RESP: + DEBUG(0,("process_complete_pdu: Error. DCERPC_PKT_ALTER_RESP on pipe %s: Should only be server -> client.\n", get_pipe_name_from_iface(&p->syntax))); break; - case RPC_AUTH3: + case DCERPC_PKT_AUTH3: /* * The third packet in an NTLMSSP auth exchange. */ @@ -602,14 +602,14 @@ static void process_complete_pdu(pipes_struct *p) } break; - case RPC_SHUTDOWN: - DEBUG(0,("process_complete_pdu: Error. RPC_SHUTDOWN on pipe %s: Should only be server -> client.\n", + case DCERPC_PKT_SHUTDOWN: + DEBUG(0,("process_complete_pdu: Error. DCERPC_PKT_SHUTDOWN on pipe %s: Should only be server -> client.\n", get_pipe_name_from_iface(&p->syntax))); break; - case RPC_CO_CANCEL: + case DCERPC_PKT_CO_CANCEL: /* For now just free all client data and continue processing. */ - DEBUG(3,("process_complete_pdu: RPC_ORPHANED. Abandoning rpc call.\n")); + DEBUG(3,("process_complete_pdu: DCERPC_PKT_CO_CANCEL. Abandoning rpc call.\n")); /* As we never do asynchronous RPC serving, we can never cancel a call (as far as I know). If we ever did we'd have to send a cancel_ack reply. For now, just free all client data and continue processing. */ @@ -626,10 +626,10 @@ static void process_complete_pdu(pipes_struct *p) break; #endif - case RPC_ORPHANED: + case DCERPC_PKT_ORPHANED: /* We should probably check the auth-verifier here. For now just free all client data and continue processing. */ - DEBUG(3,("process_complete_pdu: RPC_ORPHANED. Abandoning rpc call.\n")); + DEBUG(3,("process_complete_pdu: DCERPC_PKT_ORPHANED. Abandoning rpc call.\n")); reply = True; break; @@ -712,7 +712,7 @@ incoming data size = %u\n", (unsigned int)p->in_data.pdu_received_len, (unsigned return rret; } /* If rret == 0 and pdu_needed_len == 0 here we have a PDU that consists - of an RPC_HEADER only. This is a RPC_SHUTDOWN, RPC_CO_CANCEL or RPC_ORPHANED + of an RPC_HEADER only. This is a DCERPC_PKT_SHUTDOWN, DCERPC_PKT_CO_CANCEL or DCERPC_PKT_ORPHANED pdu type. Deal with this in process_complete_pdu(). */ } |