diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-08-01 10:42:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:15:19 -0500 |
commit | 2c4eece60489fa3d0d7aba1c1c3eec84750461fb (patch) | |
tree | 1e3bbc56815e1724a99cb8c849163630ea0ea272 /source4/smb_server/smb | |
parent | c5148cd9cd7cbc6463308b9c65bbc68c2be3b16a (diff) | |
download | samba-2c4eece60489fa3d0d7aba1c1c3eec84750461fb.tar.gz samba-2c4eece60489fa3d0d7aba1c1c3eec84750461fb.tar.bz2 samba-2c4eece60489fa3d0d7aba1c1c3eec84750461fb.zip |
r17361: check that file handles are only accessable
by the correct session in the SMB frontend server
metze
(This used to be commit 8a5bc18c5a3fa01848c02fdd855f35d6402866f3)
Diffstat (limited to 'source4/smb_server/smb')
-rw-r--r-- | source4/smb_server/smb/request.c | 11 |
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; } |