From 8047db6e4b9cbaccb8a21b8947f6d04a7ca3c436 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 17 Jun 2005 06:36:13 +0000 Subject: r7676: Make VUID and TID choice random, as this gives us protection against replay attacks under SMB signing, where the session key is a fixed derivitive of the user's password. This removes the VID offset, but I'm not worried about random client bytes mattering here, given the space (and the fact that it applies to very, very old clients). Andrew Bartlett (This used to be commit eb1d37c5a91a6bc4515469e1ae026d28c12d7149) --- source4/smb_server/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/smb_server/session.c') diff --git a/source4/smb_server/session.c b/source4/smb_server/session.c index bc2ac5fcb7..d7b7f22cd8 100644 --- a/source4/smb_server/session.c +++ b/source4/smb_server/session.c @@ -115,7 +115,7 @@ struct smbsrv_session *smbsrv_register_session(struct smbsrv_connection *smb_con ZERO_STRUCTP(sess); - i = idr_get_new_above(smb_conn->sessions.idtree_vuid, sess, VUID_OFFSET, UINT16_MAX); + i = idr_get_new_random(smb_conn->sessions.idtree_vuid, sess, UINT16_MAX); if (i == -1) { DEBUG(1,("ERROR! Out of connection structures\n")); talloc_free(sess); -- cgit