summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/request.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index 00bed16fc4..7ceceecb5f 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -668,6 +668,17 @@ struct ntvfs_handle *smbsrv_pull_fnum(struct smbsrv_request *req, const uint8_t
return NULL;
}
+ /*
+ * For SMB tcons and sessions can be mixed!
+ * But we need to make sure that file handles
+ * are only accessed by the opening session!
+ *
+ * So check if the handle is valid for the given session!
+ */
+ if (handle->session != req->session) {
+ return NULL;
+ }
+
return handle->ntvfs;
}