svn commit: samba r4684 - in branches/SAMBA_4_0/source: ntvfs/ipc
smb_server
metze at samba.org
metze at samba.org
Tue Jan 11 14:32:16 GMT 2005
Author: metze
Date: 2005-01-11 14:32:15 +0000 (Tue, 11 Jan 2005)
New Revision: 4684
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4684
Log:
the smbsrv code should not know about rpc stuff
just vfs_ipc
metze
Modified:
branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c
branches/SAMBA_4_0/source/smb_server/smb_server.c
branches/SAMBA_4_0/source/smb_server/smb_server.h
Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c 2005-01-11 14:29:26 UTC (rev 4683)
+++ branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c 2005-01-11 14:32:15 UTC (rev 4684)
@@ -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 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,19 +83,20 @@
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 @@
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);
Modified: branches/SAMBA_4_0/source/smb_server/smb_server.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb_server.c 2005-01-11 14:29:26 UTC (rev 4683)
+++ branches/SAMBA_4_0/source/smb_server/smb_server.c 2005-01-11 14:32:15 UTC (rev 4684)
@@ -852,9 +852,6 @@
conn->private_data = smb_conn;
- /* setup the DCERPC server subsystem */
- dcesrv_init_context(smb_conn, &smb_conn->dcesrv);
-
return;
}
Modified: branches/SAMBA_4_0/source/smb_server/smb_server.h
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb_server.h 2005-01-11 14:29:26 UTC (rev 4683)
+++ branches/SAMBA_4_0/source/smb_server/smb_server.h 2005-01-11 14:32:15 UTC (rev 4684)
@@ -268,8 +268,6 @@
struct substitute_context substitute;
- struct dcesrv_context *dcesrv;
-
/* the pid of the process handling this session */
pid_t pid;
More information about the samba-cvs
mailing list