summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb_server.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-06 17:59:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:09 -0500
commit273f340376452bd072b68d0601dde3f7b43b62db (patch)
treed62e422cedc3ab2fbcd67697db3cb4b5a4fa8c0d /source4/smb_server/smb_server.h
parent2184ad5af7f354dfb5f8addcb99e69fa2f79df01 (diff)
downloadsamba-273f340376452bd072b68d0601dde3f7b43b62db.tar.gz
samba-273f340376452bd072b68d0601dde3f7b43b62db.tar.bz2
samba-273f340376452bd072b68d0601dde3f7b43b62db.zip
r12102: for SMB2 we need to allocate tcons per session
metze (This used to be commit 4d527ac005086c2db954578b4126ca128e436e01)
Diffstat (limited to 'source4/smb_server/smb_server.h')
-rw-r--r--source4/smb_server/smb_server.h58
1 files changed, 35 insertions, 23 deletions
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