summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe_hnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srv_pipe_hnd.c')
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c53
1 files changed, 33 insertions, 20 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 0c858c203e..5d5eb0eeb1 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -96,7 +96,7 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
pipes_struct *p;
DEBUG(4,("Create pipe requested %s\n",
- get_pipe_name_from_iface(syntax)));
+ get_pipe_name_from_syntax(talloc_tos(), syntax)));
p = TALLOC_ZERO_P(mem_ctx, struct pipes_struct);
@@ -105,9 +105,10 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
return NULL;
}
- if ((p->mem_ctx = talloc_init("pipe %s %p",
- get_pipe_name_from_iface(syntax),
- p)) == NULL) {
+ p->mem_ctx = talloc_init("pipe %s %p",
+ get_pipe_name_from_syntax(talloc_tos(),
+ syntax), p);
+ if (p->mem_ctx == NULL) {
DEBUG(0,("open_rpc_pipe_p: talloc_init failed.\n"));
TALLOC_FREE(p);
return NULL;
@@ -158,7 +159,7 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
p->syntax = *syntax;
DEBUG(4,("Created internal pipe %s (pipes_open=%d)\n",
- get_pipe_name_from_iface(syntax), pipes_open));
+ get_pipe_name_from_syntax(talloc_tos(), syntax), pipes_open));
talloc_set_destructor(p, close_internal_rpc_pipe_hnd);
@@ -176,7 +177,7 @@ static void set_incoming_fault(pipes_struct *p)
p->in_data.pdu_received_len = 0;
p->fault_state = True;
DEBUG(10, ("set_incoming_fault: Setting fault state on pipe %s\n",
- get_pipe_name_from_iface(&p->syntax)));
+ get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
}
/****************************************************************************
@@ -344,7 +345,9 @@ static void free_pipe_context(pipes_struct *p)
talloc_free_children(p->mem_ctx);
} else {
p->mem_ctx = talloc_init(
- "pipe %s %p", get_pipe_name_from_iface(&p->syntax), p);
+ "pipe %s %p", get_pipe_name_from_syntax(talloc_tos(),
+ &p->syntax),
+ p);
if (p->mem_ctx == NULL) {
p->fault_state = True;
}
@@ -512,7 +515,7 @@ static void process_complete_pdu(pipes_struct *p)
if(p->fault_state) {
DEBUG(10,("process_complete_pdu: pipe %s in fault state.\n",
- get_pipe_name_from_iface(&p->syntax)));
+ get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
set_incoming_fault(p);
setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_OP_RNG_ERROR));
return;
@@ -541,12 +544,14 @@ static void process_complete_pdu(pipes_struct *p)
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)));
+ get_pipe_name_from_syntax(talloc_tos(),
+ &p->syntax)));
break;
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)));
+ get_pipe_name_from_syntax(talloc_tos(),
+ &p->syntax)));
break;
case DCERPC_PKT_FAULT:
@@ -559,7 +564,8 @@ static void process_complete_pdu(pipes_struct *p)
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)));
+ get_pipe_name_from_syntax(talloc_tos(),
+ &p->syntax)));
break;
case DCERPC_PKT_BIND:
@@ -575,7 +581,8 @@ static void process_complete_pdu(pipes_struct *p)
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)));
+ get_pipe_name_from_syntax(talloc_tos(),
+ &p->syntax)));
break;
@@ -590,7 +597,8 @@ static void process_complete_pdu(pipes_struct *p)
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)));
+ get_pipe_name_from_syntax(talloc_tos(),
+ &p->syntax)));
break;
case DCERPC_PKT_AUTH3:
@@ -604,7 +612,8 @@ static void process_complete_pdu(pipes_struct *p)
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)));
+ get_pipe_name_from_syntax(talloc_tos(),
+ &p->syntax)));
break;
case DCERPC_PKT_CO_CANCEL:
@@ -643,7 +652,8 @@ static void process_complete_pdu(pipes_struct *p)
if (!reply) {
DEBUG(3,("process_complete_pdu: DCE/RPC fault sent on "
- "pipe %s\n", get_pipe_name_from_iface(&p->syntax)));
+ "pipe %s\n", get_pipe_name_from_syntax(talloc_tos(),
+ &p->syntax)));
set_incoming_fault(p);
setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_OP_RNG_ERROR));
prs_mem_free(&rpc_in);
@@ -798,7 +808,8 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_
return -1;
}
- DEBUG(6,(" name: %s len: %u\n", get_pipe_name_from_iface(&p->syntax),
+ DEBUG(6,(" name: %s len: %u\n",
+ get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
(unsigned int)n));
/*
@@ -815,7 +826,8 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_
if(n > RPC_MAX_PDU_FRAG_LEN) {
DEBUG(5,("read_from_pipe: too large read (%u) requested on "
"pipe %s. We can only service %d sized reads.\n",
- (unsigned int)n, get_pipe_name_from_iface(&p->syntax),
+ (unsigned int)n,
+ get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
RPC_MAX_PDU_FRAG_LEN ));
n = RPC_MAX_PDU_FRAG_LEN;
}
@@ -836,7 +848,7 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_
DEBUG(10,("read_from_pipe: %s: current_pdu_len = %u, "
"current_pdu_sent = %u returning %d bytes.\n",
- get_pipe_name_from_iface(&p->syntax),
+ get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
(unsigned int)prs_offset(&p->out_data.frag),
(unsigned int)p->out_data.current_pdu_sent,
(int)data_returned));
@@ -857,7 +869,8 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_
DEBUG(10,("read_from_pipe: %s: fault_state = %d : data_sent_length "
"= %u, prs_offset(&p->out_data.rdata) = %u.\n",
- get_pipe_name_from_iface(&p->syntax), (int)p->fault_state,
+ get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
+ (int)p->fault_state,
(unsigned int)p->out_data.data_sent_length,
(unsigned int)prs_offset(&p->out_data.rdata) ));
@@ -878,7 +891,7 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_
if(!create_next_pdu(p)) {
DEBUG(0,("read_from_pipe: %s: create_next_pdu failed.\n",
- get_pipe_name_from_iface(&p->syntax)));
+ get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
return -1;
}