summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb_server.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-04-10 07:39:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:29 -0500
commit20841a25ad2a45ec920d9ad41f1279cbe2aa196f (patch)
tree4ec67292599ded688f0c370745e206c155ef0c5b /source4/smb_server/smb_server.h
parentce7eb419307de28b6a674948a70960a39e0c38f8 (diff)
downloadsamba-20841a25ad2a45ec920d9ad41f1279cbe2aa196f.tar.gz
samba-20841a25ad2a45ec920d9ad41f1279cbe2aa196f.tar.bz2
samba-20841a25ad2a45ec920d9ad41f1279cbe2aa196f.zip
r6270: Move the VUID handling to a IDR tree. This should avoid O(n)
behaviour on session setups, and because we no longer need do deal with the linked list as much, the code is much simpiler too. We may be able to compleatly remove the tid and vuid linked lists, but I need to check. This patch also tries to clean up the VUID handling and session setups in general. To avoid security issues, we now have a distinction between VUIDs allocated for the session setup (to tie togeather the multiple round trips) and those used after authentication. Andrew Bartlett (This used to be commit 3e5775146d9ce6f0ac43aecae7e899b5324399ad)
Diffstat (limited to 'source4/smb_server/smb_server.h')
-rw-r--r--source4/smb_server/smb_server.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h
index 02070f2b13..2f176d9c66 100644
--- a/source4/smb_server/smb_server.h
+++ b/source4/smb_server/smb_server.h
@@ -47,6 +47,10 @@ struct smbsrv_session {
struct gensec_security *gensec_ctx;
struct auth_session_info *session_info;
+
+ /* Distinguish between a VUID allocated for the multi-pass
+ * extended secrity session setup and one that is finished */
+ BOOL finished_sesssetup;
};
/* we need a forward declaration of the ntvfs_ops strucutre to prevent
@@ -216,8 +220,11 @@ struct smbsrv_connection {
struct {
/* this holds info on session vuids that are already validated for this VC */
struct smbsrv_session *session_list;
- uint16_t next_vuid; /* initialise to VUID_OFFSET */
+
int num_validated_vuids;
+
+ /* an id tree used to allocate vuids */
+ struct idr_context *idtree_vuid;
} sessions;
/* the server_context holds a linked list of pending requests,