summaryrefslogtreecommitdiff
path: root/source3/smbd/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/files.c')
-rw-r--r--source3/smbd/files.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 18330805d8..d410083009 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -626,15 +626,12 @@ struct files_struct *file_fsp_smb2(struct smbd_smb2_request *smb2req,
uint64_t volatile_id)
{
struct files_struct *fsp;
+ uint64_t fsp_persistent;
if (smb2req->compat_chain_fsp != NULL) {
return smb2req->compat_chain_fsp;
}
- if (persistent_id != volatile_id) {
- return NULL;
- }
-
if (volatile_id > UINT16_MAX) {
return NULL;
}
@@ -643,6 +640,11 @@ struct files_struct *file_fsp_smb2(struct smbd_smb2_request *smb2req,
if (fsp == NULL) {
return NULL;
}
+ fsp_persistent = fsp_persistent_id(fsp);
+
+ if (persistent_id != fsp_persistent) {
+ return NULL;
+ }
if (smb2req->tcon == NULL) {
return NULL;