summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-01-11 14:32:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:43 -0500
commit91e9cf6d1a53cc63410e1535907a2ad015e80c82 (patch)
tree42062995dd430d8d8cedac090bc228698d16dbc8 /source4
parenta97cb33fcc4651b4af1c7d16807723d0d0f817d4 (diff)
downloadsamba-91e9cf6d1a53cc63410e1535907a2ad015e80c82.tar.gz
samba-91e9cf6d1a53cc63410e1535907a2ad015e80c82.tar.bz2
samba-91e9cf6d1a53cc63410e1535907a2ad015e80c82.zip
r4684: the smbsrv code should not know about rpc stuff
just vfs_ipc metze (This used to be commit f85ebd1e8e19f5ff271dd7d79190fea16d6a98c4)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c20
-rw-r--r--source4/smb_server/smb_server.c3
-rw-r--r--source4/smb_server/smb_server.h2
3 files changed, 12 insertions, 13 deletions
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 2f482bb5e4..2a19de1ec0 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -38,6 +38,8 @@
struct ipc_private {
struct idr_context *idtree_fnum;
+ struct dcesrv_context *dcesrv;
+
/* a list of open pipes */
struct pipe_state {
struct pipe_state *next, *prev;
@@ -73,6 +75,7 @@ static struct pipe_state *pipe_state_find(struct ipc_private *private, uint16_t
static NTSTATUS ipc_connect(struct ntvfs_module_context *ntvfs,
struct smbsrv_request *req, const char *sharename)
{
+ NTSTATUS status;
struct smbsrv_tcon *tcon = req->tcon;
struct ipc_private *private;
@@ -80,18 +83,19 @@ static NTSTATUS ipc_connect(struct ntvfs_module_context *ntvfs,
tcon->dev_type = talloc_strdup(tcon, "IPC");
/* prepare the private state for this connection */
- private = talloc_p(tcon, struct ipc_private);
- if (!private) {
- return NT_STATUS_NO_MEMORY;
- }
+ private = talloc(tcon, struct ipc_private);
+ NT_STATUS_HAVE_NO_MEMORY(private);
+
ntvfs->private_data = private;
private->pipe_list = NULL;
private->idtree_fnum = idr_init(private);
- if (private->idtree_fnum == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
+ NT_STATUS_HAVE_NO_MEMORY(private->idtree_fnum);
+
+ /* setup the DCERPC server subsystem */
+ status = dcesrv_init_context(private, &private->dcesrv);
+ NT_STATUS_NOT_OK_RETURN(status);
return NT_STATUS_OK;
}
@@ -226,7 +230,7 @@ static NTSTATUS ipc_open_generic(struct ntvfs_module_context *ntvfs,
session_info = req->session->session_info;
}
- status = dcesrv_endpoint_search_connect(req->smb_conn->dcesrv,
+ status = dcesrv_endpoint_search_connect(private->dcesrv,
&ep_description,
session_info,
&p->dce_conn);
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index e6201c077e..0b2fe668af 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -852,9 +852,6 @@ void smbsrv_accept(struct server_connection *conn)
conn->private_data = smb_conn;
- /* setup the DCERPC server subsystem */
- dcesrv_init_context(smb_conn, &smb_conn->dcesrv);
-
return;
}
diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h
index 5324fb8a67..8486ad0da6 100644
--- a/source4/smb_server/smb_server.h
+++ b/source4/smb_server/smb_server.h
@@ -268,8 +268,6 @@ struct smbsrv_connection {
struct substitute_context substitute;
- struct dcesrv_context *dcesrv;
-
/* the pid of the process handling this session */
pid_t pid;