summaryrefslogtreecommitdiffstats
path: root/source3/smbd/smb2_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/smb2_server.c')
-rw-r--r--source3/smbd/smb2_server.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index a3ed09bbb21..768a9c8c05a 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1749,9 +1749,12 @@ static NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req)
return NT_STATUS_INVALID_HANDLE;
}
- set_current_user_info(session_info->unix_info->sanitized_username,
- session_info->unix_info->unix_name,
- session_info->info->domain_name);
+ if (in_session_id != req->sconn->conn->last_session_id) {
+ req->sconn->conn->last_session_id = in_session_id;
+ set_current_user_info(session_info->unix_info->sanitized_username,
+ session_info->unix_info->unix_name,
+ session_info->info->domain_name);
+ }
return NT_STATUS_OK;
}