summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/proto.h2
-rw-r--r--source3/smbd/session.c5
-rw-r--r--source3/smbd/sesssetup.c4
-rw-r--r--source3/smbd/smb2_sesssetup.c2
4 files changed, 7 insertions, 6 deletions
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 5f41957fc4..ffbc8d808e 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -995,7 +995,7 @@ void close_cnum(connection_struct *conn, uint64_t vuid);
struct sessionid;
struct smbXsrv_session;
bool session_init(void);
-bool session_claim(struct smbd_server_connection *sconn, struct smbXsrv_session *session);
+bool session_claim(struct smbXsrv_session *session);
void session_yield(struct smbXsrv_session *session);
int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index c931f8b8e1..abb1e316bc 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -40,9 +40,10 @@
called when a session is created
********************************************************************/
-bool session_claim(struct smbd_server_connection *sconn, struct smbXsrv_session *session)
+bool session_claim(struct smbXsrv_session *session)
{
struct user_struct *vuser = session->compat;
+ struct smbd_server_connection *sconn = session->connection->sconn;
struct server_id pid = messaging_server_id(sconn->msg_ctx);
TDB_DATA data;
int i = 0;
@@ -137,7 +138,7 @@ bool session_claim(struct smbd_server_connection *sconn, struct smbXsrv_session
SMB_ASSERT(rec != NULL);
- raddr = tsocket_address_inet_addr_string(sconn->remote_address,
+ raddr = tsocket_address_inet_addr_string(session->connection->remote_address,
talloc_tos());
if (raddr == NULL) {
return false;
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 16a71f7408..cd7928de50 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -326,7 +326,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
register_homes_share(session_info->unix_info->unix_name);
}
- if (!session_claim(sconn, session)) {
+ if (!session_claim(session)) {
DEBUG(1, ("smb1: Failed to claim session for vuid=%llu\n",
(unsigned long long)session->compat->vuid));
data_blob_free(&out_blob);
@@ -1008,7 +1008,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
register_homes_share(session_info->unix_info->unix_name);
}
- if (!session_claim(sconn, session)) {
+ if (!session_claim(session)) {
DEBUG(1, ("smb1: Failed to claim session for vuid=%llu\n",
(unsigned long long)session->compat->vuid));
data_blob_free(&nt_resp);
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 29253d0321..171021a258 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -330,7 +330,7 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session,
register_homes_share(session_info->unix_info->unix_name);
}
- if (!session_claim(smb2req->sconn, session)) {
+ if (!session_claim(session)) {
DEBUG(1, ("smb2: Failed to claim session "
"for vuid=%llu\n",
(unsigned long long)session->compat->vuid));