summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-18 11:42:43 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-07-18 14:01:02 +0200
commitdf09511cf2d4462384b85ef0d0a82e059a93d4c5 (patch)
treecb98ff20f677219d211f971622bdad4951a99363 /source3/rpc_server
parent73bfd16bd589989b2e64599f03bc43a52ebfcbbc (diff)
downloadsamba-df09511cf2d4462384b85ef0d0a82e059a93d4c5.tar.gz
samba-df09511cf2d4462384b85ef0d0a82e059a93d4c5.tar.bz2
samba-df09511cf2d4462384b85ef0d0a82e059a93d4c5.zip
s3-rpc_server: Fixed segfaults in rpc daemons.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Jul 18 14:01:02 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/epmd.c2
-rw-r--r--source3/rpc_server/rpc_server.c6
-rw-r--r--source3/rpc_server/rpc_server.h3
3 files changed, 8 insertions, 3 deletions
diff --git a/source3/rpc_server/epmd.c b/source3/rpc_server/epmd.c
index bb241ff2c1..6f3959b5b8 100644
--- a/source3/rpc_server/epmd.c
+++ b/source3/rpc_server/epmd.c
@@ -274,7 +274,7 @@ void start_epmd(struct tevent_context *ev_ctx,
exit(1);
}
- ok = setup_named_pipe_socket("epmapper", ev_ctx);
+ ok = setup_named_pipe_socket("epmapper", ev_ctx, msg_ctx);
if (!ok) {
DEBUG(0, ("Failed to open epmd named pipe!\n"));
exit(1);
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 2dffaff3f0..6eef6f1431 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -212,7 +212,8 @@ static void named_pipe_listener(struct tevent_context *ev,
void *private_data);
bool setup_named_pipe_socket(const char *pipe_name,
- struct tevent_context *ev_ctx)
+ struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx)
{
struct dcerpc_ncacn_listen_state *state;
struct tevent_fd *fde;
@@ -230,6 +231,9 @@ bool setup_named_pipe_socket(const char *pipe_name,
}
state->fd = -1;
+ state->ev_ctx = ev_ctx;
+ state->msg_ctx = msg_ctx;
+
/*
* As lp_ncalrpc_dir() should have 0755, but
* lp_ncalrpc_dir()/np should have 0700, we need to
diff --git a/source3/rpc_server/rpc_server.h b/source3/rpc_server/rpc_server.h
index aafc96238a..be6a154333 100644
--- a/source3/rpc_server/rpc_server.h
+++ b/source3/rpc_server/rpc_server.h
@@ -27,7 +27,8 @@ typedef bool (*dcerpc_ncacn_disconnect_fn)(struct pipes_struct *p);
void set_incoming_fault(struct pipes_struct *p);
void process_complete_pdu(struct pipes_struct *p);
bool setup_named_pipe_socket(const char *pipe_name,
- struct tevent_context *ev_ctx);
+ struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx);
uint16_t setup_dcerpc_ncacn_tcpip_socket(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx,