git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5148cd
)
r17361: check that file handles are only accessable
author
Stefan Metzmacher
<metze@samba.org>
Tue, 1 Aug 2006 10:42:03 +0000
(10:42 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 19:15:19 +0000
(14:15 -0500)
by the correct session in the SMB frontend server
metze
(This used to be commit
8a5bc18c5a3fa01848c02fdd855f35d6402866f3
)
source4/smb_server/smb/request.c
patch
|
blob
|
history
diff --git
a/source4/smb_server/smb/request.c
b/source4/smb_server/smb/request.c
index 00bed16fc41a639d2d868491e225cd968bc0952d..7ceceecb5fe3950003199ac10432073b0b4d1dca 100644
(file)
--- 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;
}