summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-04-09 22:31:37 +0000
committerJeremy Allison <jra@samba.org>2003-04-09 22:31:37 +0000
commit045db5d0458b331e987d82d6e9a61a0b85957d17 (patch)
tree875c013dbc6f8164ffa341e8b33e57da05be0e78 /source3/smbd/reply.c
parent0b11782f733db1d754d95ca03bb21550ab1156f1 (diff)
downloadsamba-045db5d0458b331e987d82d6e9a61a0b85957d17.tar.gz
samba-045db5d0458b331e987d82d6e9a61a0b85957d17.tar.bz2
samba-045db5d0458b331e987d82d6e9a61a0b85957d17.zip
Ensure we have WinXP-like semantics for checking TIDs and FIDs.
Jeremy. (This used to be commit 52e44dde4ef9717eae7cf454f56d309fdd4b7d1f)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 77f4c6783f..7da5c877a7 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1464,6 +1464,7 @@ void send_file_readbraw(connection_struct *conn, files_struct *fsp, SMB_OFF_T st
int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_size, int dum_buffsize)
{
+ extern struct current_user current_user;
ssize_t maxcount,mincount;
size_t nread = 0;
SMB_OFF_T startpos;
@@ -2361,6 +2362,7 @@ int reply_exit(connection_struct *conn,
int reply_close(connection_struct *conn, char *inbuf,char *outbuf, int size,
int dum_buffsize)
{
+ extern struct current_user current_user;
int outsize = 0;
time_t mtime;
int32 eclass = 0, err = 0;
@@ -2381,7 +2383,7 @@ int reply_close(connection_struct *conn, char *inbuf,char *outbuf, int size,
* We can only use CHECK_FSP if we know it's not a directory.
*/
- if(!fsp || (fsp->conn != conn)) {
+ if(!fsp || (fsp->conn != conn) || (fsp->vuid != current_user.vuid)) {
END_PROFILE(SMBclose);
return ERROR_DOS(ERRDOS,ERRbadfid);
}