mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
smbd: remove xconn->client->last_session_id based set_current_user_info() caching
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
df5e459299
commit
71d5809188
@ -123,7 +123,6 @@ interface smbXsrv
|
||||
* this session_table is used for SMB1 and SMB2,
|
||||
*/
|
||||
[ignore] struct smbXsrv_session_table *session_table;
|
||||
[ignore] hyper last_session_id;
|
||||
/*
|
||||
* this tcon_table is only used for SMB1.
|
||||
*/
|
||||
|
@ -1571,13 +1571,9 @@ static connection_struct *switch_message(uint8_t type, struct smb_request *req)
|
||||
}
|
||||
}
|
||||
|
||||
if (session_tag != xconn->client->last_session_id) {
|
||||
struct user_struct *vuser = NULL;
|
||||
if (session != NULL) {
|
||||
struct user_struct *vuser = session->compat;
|
||||
|
||||
xconn->client->last_session_id = session_tag;
|
||||
if (session) {
|
||||
vuser = session->compat;
|
||||
}
|
||||
if (vuser) {
|
||||
set_current_user_info(
|
||||
vuser->session_info->unix_info->sanitized_username,
|
||||
|
@ -1964,12 +1964,9 @@ static NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req)
|
||||
return NT_STATUS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (in_session_id != req->xconn->client->last_session_id) {
|
||||
req->xconn->client->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);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user