diff options
Diffstat (limited to 'source4/librpc/rpc/dcerpc_sock.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc_sock.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c index a5abf9b4be..f7ae377e7b 100644 --- a/source4/librpc/rpc/dcerpc_sock.c +++ b/source4/librpc/rpc/dcerpc_sock.c @@ -28,6 +28,7 @@ #include "libcli/composite/composite.h" #include "librpc/rpc/dcerpc.h" #include "libcli/resolve/resolve.h" +#include "param/param.h" /* transport private information used by general socket pipe transports */ struct sock_private { @@ -45,7 +46,7 @@ struct sock_private { */ static void sock_dead(struct dcerpc_connection *p, NTSTATUS status) { - struct sock_private *sock = p->transport.private_data; + struct sock_private *sock = (struct sock_private *)p->transport.private_data; if (!sock) return; @@ -111,7 +112,7 @@ static NTSTATUS sock_process_recv(void *private, DATA_BLOB blob) { struct dcerpc_connection *p = talloc_get_type(private, struct dcerpc_connection); - struct sock_private *sock = p->transport.private_data; + struct sock_private *sock = (struct sock_private *)p->transport.private_data; sock->pending_reads--; if (sock->pending_reads == 0) { packet_recv_disable(sock->packet); @@ -128,7 +129,7 @@ static void sock_io_handler(struct event_context *ev, struct fd_event *fde, { struct dcerpc_connection *p = talloc_get_type(private, struct dcerpc_connection); - struct sock_private *sock = p->transport.private_data; + struct sock_private *sock = (struct sock_private *)p->transport.private_data; if (flags & EVENT_FD_WRITE) { packet_queue_run(sock->packet); @@ -149,7 +150,7 @@ static void sock_io_handler(struct event_context *ev, struct fd_event *fde, */ static NTSTATUS sock_send_read(struct dcerpc_connection *p) { - struct sock_private *sock = p->transport.private_data; + struct sock_private *sock = (struct sock_private *)p->transport.private_data; sock->pending_reads++; if (sock->pending_reads == 1) { packet_recv_enable(sock->packet); @@ -161,9 +162,9 @@ static NTSTATUS sock_send_read(struct dcerpc_connection *p) send an initial pdu in a multi-pdu sequence */ static NTSTATUS sock_send_request(struct dcerpc_connection *p, DATA_BLOB *data, - BOOL trigger_read) + bool trigger_read) { - struct sock_private *sock = p->transport.private_data; + struct sock_private *sock = (struct sock_private *)p->transport.private_data; DATA_BLOB blob; NTSTATUS status; @@ -193,7 +194,7 @@ static NTSTATUS sock_send_request(struct dcerpc_connection *p, DATA_BLOB *data, */ static NTSTATUS sock_shutdown_pipe(struct dcerpc_connection *p, NTSTATUS status) { - struct sock_private *sock = p->transport.private_data; + struct sock_private *sock = (struct sock_private *)p->transport.private_data; if (sock && sock->sock) { sock_dead(p, status); @@ -294,7 +295,7 @@ static void continue_socket_connect(struct composite_context *ctx) packet_set_initial_read(sock->packet, 16); /* ensure we don't get SIGPIPE */ - BlockSignals(True,SIGPIPE); + BlockSignals(true, SIGPIPE); composite_done(c); } @@ -477,7 +478,8 @@ struct composite_context* dcerpc_pipe_open_tcp_send(struct dcerpc_connection *co s->conn = conn; make_nbt_name_server(&name, server); - resolve_req = resolve_name_send(&name, c->event_ctx, lp_name_resolve_order()); + resolve_req = resolve_name_send(&name, c->event_ctx, + lp_name_resolve_order(global_loadparm)); composite_continue(c, resolve_req, continue_ip_resolve_name, c); return c; } @@ -617,7 +619,7 @@ struct composite_context* dcerpc_pipe_open_pipe_send(struct dcerpc_connection *c s->conn = conn; string_replace(canon, '/', '\\'); - s->full_path = talloc_asprintf(canon, "%s/%s", lp_ncalrpc_dir(), canon); + s->full_path = talloc_asprintf(canon, "%s/%s", lp_ncalrpc_dir(global_loadparm), canon); if (composite_nomem(s->full_path, c)) return c; /* prepare server address using path and transport name */ |