mirror of
https://github.com/samba-team/samba.git
synced 2025-08-29 13:49:30 +03:00
s3: Remove procid_self() from session_claim()
This commit is contained in:
@ -6221,7 +6221,7 @@ void close_cnum(connection_struct *conn, uint16 vuid);
|
||||
/* The following definitions come from smbd/session.c */
|
||||
|
||||
bool session_init(void);
|
||||
bool session_claim(user_struct *vuser);
|
||||
bool session_claim(struct server_id pid, user_struct *vuser);
|
||||
void session_yield(user_struct *vuser);
|
||||
int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
|
||||
|
||||
|
@ -302,7 +302,7 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
|
||||
"and will be vuid %u\n", (int)vuser->server_info->utok.uid,
|
||||
vuser->server_info->unix_name, vuser->vuid));
|
||||
|
||||
if (!session_claim(vuser)) {
|
||||
if (!session_claim(sconn_server_id(sconn), vuser)) {
|
||||
DEBUG(1, ("register_existing_vuid: Failed to claim session "
|
||||
"for vuid=%d\n",
|
||||
vuser->vuid));
|
||||
|
@ -33,12 +33,11 @@
|
||||
called when a session is created
|
||||
********************************************************************/
|
||||
|
||||
bool session_claim(user_struct *vuser)
|
||||
bool session_claim(struct server_id pid, user_struct *vuser)
|
||||
{
|
||||
TDB_DATA data;
|
||||
int i = 0;
|
||||
struct sessionid sessionid;
|
||||
struct server_id pid = procid_self();
|
||||
fstring keystr;
|
||||
const char * hostname;
|
||||
struct db_record *rec;
|
||||
|
@ -444,7 +444,8 @@ static NTSTATUS smbd_smb2_session_setup_krb5(struct smbd_smb2_session *session,
|
||||
register_homes_share(session->server_info->unix_name);
|
||||
}
|
||||
|
||||
if (!session_claim(session->compat_vuser)) {
|
||||
if (!session_claim(sconn_server_id(session->sconn),
|
||||
session->compat_vuser)) {
|
||||
DEBUG(1, ("smb2: Failed to claim session "
|
||||
"for vuid=%d\n",
|
||||
session->compat_vuser->vuid));
|
||||
@ -662,7 +663,8 @@ static NTSTATUS smbd_smb2_common_ntlmssp_auth_return(struct smbd_smb2_session *s
|
||||
register_homes_share(session->server_info->unix_name);
|
||||
}
|
||||
|
||||
if (!session_claim(session->compat_vuser)) {
|
||||
if (!session_claim(sconn_server_id(session->sconn),
|
||||
session->compat_vuser)) {
|
||||
DEBUG(1, ("smb2: Failed to claim session "
|
||||
"for vuid=%d\n",
|
||||
session->compat_vuser->vuid));
|
||||
|
Reference in New Issue
Block a user