summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/smbd/password.c2
-rw-r--r--source3/smbd/session.c3
-rw-r--r--source3/smbd/smb2_sesssetup.c6
4 files changed, 7 insertions, 6 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2d79aed03e..98edb55951 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 1a55a396f2..2bd333ab30 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -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));
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index fdbb4834ab..64274b771e 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -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;
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index af9157107e..56aa2b8039 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -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));