summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/password.c4
-rw-r--r--source3/smbd/smb2_sesssetup.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index b1a749736d..4c1cef45cc 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -128,6 +128,10 @@ void invalidate_vuid(struct smbd_server_connection *sconn, uint16 vuid)
void invalidate_all_vuids(struct smbd_server_connection *sconn)
{
+ if (sconn->allow_smb2) {
+ return;
+ }
+
while (sconn->smb1.sessions.validated_users != NULL) {
invalidate_vuid(sconn,
sconn->smb1.sessions.validated_users->vuid);
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index eae26ed06c..9b1dc8cdf8 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -131,6 +131,7 @@ static int smbd_smb2_session_destructor(struct smbd_smb2_session *session)
idr_remove(session->sconn->smb2.sessions.idtree, session->vuid);
DLIST_REMOVE(session->sconn->smb2.sessions.list, session);
+ invalidate_vuid(session->sconn, session->vuid);
session->vuid = 0;
session->status = NT_STATUS_USER_SESSION_DELETED;