From 273f340376452bd072b68d0601dde3f7b43b62db Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 6 Dec 2005 17:59:20 +0000 Subject: r12102: for SMB2 we need to allocate tcons per session metze (This used to be commit 4d527ac005086c2db954578b4126ca128e436e01) --- source4/smb_server/smb_server.h | 58 +++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 23 deletions(-) (limited to 'source4/smb_server/smb_server.h') diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h index f879845134..6a73383480 100644 --- a/source4/smb_server/smb_server.h +++ b/source4/smb_server/smb_server.h @@ -32,12 +32,39 @@ these basic elements */ +struct smbsrv_tcons_context { + /* an id tree used to allocate tids */ + struct idr_context *idtree_tid; + + /* this is the limit of vuid values for this connection */ + uint32_t idtree_limit; + + /* list of open tree connects */ + struct smbsrv_tcon *list; +}; + +struct smbsrv_sessions_context { + /* an id tree used to allocate vuids */ + /* this holds info on session vuids that are already + * validated for this VC */ + struct idr_context *idtree_vuid; + + /* this is the limit of vuid values for this connection */ + uint64_t idtree_limit; + + /* also kept as a link list so it can be enumerated by + the management code */ + struct smbsrv_session *list; +} sessions; + /* the current user context for a request */ struct smbsrv_session { struct smbsrv_session *prev, *next; struct smbsrv_connection *smb_conn; + struct smbsrv_tcons_context smb2_tcons; + /* * an index passed over the wire: * - 16 bit for smb @@ -94,6 +121,12 @@ struct smbsrv_tcon { struct smbsrv_session *session; } sec_share; + /* some stuff to support share level security */ + struct { + /* in SMB2 a tcon always belongs to one session */ + struct smbsrv_session *session; + } smb2; + /* some statictics for the management tools */ struct { struct timeval connect_time; @@ -232,31 +265,10 @@ struct smbsrv_connection { } negotiate; /* the context associated with open tree connects on a smb socket */ - struct { - /* an id tree used to allocate tids */ - struct idr_context *idtree_tid; - - /* this is the limit of vuid values for this connection */ - uint32_t idtree_limit; - - /* list of open tree connects */ - struct smbsrv_tcon *list; - } tcons; + struct smbsrv_tcons_context smb_tcons; /* context associated with currently valid session setups */ - struct { - /* an id tree used to allocate vuids */ - /* this holds info on session vuids that are already - * validated for this VC */ - struct idr_context *idtree_vuid; - - /* this is the limit of vuid values for this connection */ - uint64_t idtree_limit; - - /* also kept as a link list so it can be enumerated by - the management code */ - struct smbsrv_session *list; - } sessions; + struct smbsrv_sessions_context sessions; /* the server_context holds a linked list of pending requests, * this is used for blocking locks and requests blocked due to oplock -- cgit