summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-15 22:52:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:31 -0500
commit71e81580421225d5b35a25d46a7b6064a826685c (patch)
treed9d0a0376e5d6c5a48b105f232a7460e9b0ee235
parentd2c1842978cd50485849bfc4fb6d94767d96cab0 (diff)
downloadsamba-71e81580421225d5b35a25d46a7b6064a826685c.tar.gz
samba-71e81580421225d5b35a25d46a7b6064a826685c.tar.xz
samba-71e81580421225d5b35a25d46a7b6064a826685c.zip
r14460: SMBexit closes by pid and vuid. Tested with smbtorture.
Jeremy.
-rw-r--r--source/smbd/files.c6
-rw-r--r--source/smbd/reply.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/files.c b/source/smbd/files.c
index 5a545c236e6..ba4baa93b10 100644
--- a/source/smbd/files.c
+++ b/source/smbd/files.c
@@ -154,16 +154,16 @@ void file_close_conn(connection_struct *conn)
}
/****************************************************************************
- Close all open files for a pid.
+ Close all open files for a pid and a vuid.
****************************************************************************/
-void file_close_pid(uint16 smbpid)
+void file_close_pid(uint16 smbpid, int vuid)
{
files_struct *fsp, *next;
for (fsp=Files;fsp;fsp=next) {
next = fsp->next;
- if (fsp->file_pid == smbpid) {
+ if ((fsp->file_pid == smbpid) && (fsp->vuid == vuid)) {
close_file(fsp,SHUTDOWN_CLOSE);
}
}
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 1ca9d39a4c7..83f527d326c 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -3220,7 +3220,7 @@ int reply_exit(connection_struct *conn,
int outsize;
START_PROFILE(SMBexit);
- file_close_pid(SVAL(inbuf,smb_pid));
+ file_close_pid(SVAL(inbuf,smb_pid),SVAL(inbuf,smb_uid));
outsize = set_message(outbuf,0,0,True);