summaryrefslogtreecommitdiff
path: root/source3/smbd/files.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-05-17 23:15:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:06 -0500
commitcc9ea93456e594432e203e6d2d2f4dbcaac9a3dd (patch)
tree7bf722a9a742cf7986f31f454bfd17a4a8415ec0 /source3/smbd/files.c
parentc91a675ac108f48046ce72287c6d70a1a54ef65f (diff)
downloadsamba-cc9ea93456e594432e203e6d2d2f4dbcaac9a3dd.tar.gz
samba-cc9ea93456e594432e203e6d2d2f4dbcaac9a3dd.tar.bz2
samba-cc9ea93456e594432e203e6d2d2f4dbcaac9a3dd.zip
r15668: DOS or FCB opens share one share mode entry from different
fsp pointers. Ensure we cope with this to pass Samba4 DENY tests (we used to pass these, there must have been a regression with newer code). We now pass them. Jeremy (This used to be commit fd6fa1d4eaf61783df74ee2da50d331477f06998)
Diffstat (limited to 'source3/smbd/files.c')
-rw-r--r--source3/smbd/files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index ba4baa93b1..53207e876e 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -109,7 +109,7 @@ files_struct *file_new(connection_struct *conn)
fsp->fh->fd = -1;
fsp->conn = conn;
- fsp->file_id = get_gen_count();
+ fsp->fh->file_id = get_gen_count();
GetTimeOfDay(&fsp->open_time);
first_file = (i+1) % real_max_open_files;
@@ -238,7 +238,7 @@ void file_dump_open_table(void)
for (fsp=Files;fsp;fsp=fsp->next,count++) {
DEBUG(10,("Files[%d], fnum = %d, name %s, fd = %d, fileid = %lu, dev = %x, inode = %.0f\n",
- count, fsp->fnum, fsp->fsp_name, fsp->fh->fd, (unsigned long)fsp->file_id,
+ count, fsp->fnum, fsp->fsp_name, fsp->fh->fd, (unsigned long)fsp->fh->file_id,
(unsigned int)fsp->dev, (double)fsp->inode ));
}
}
@@ -277,7 +277,7 @@ files_struct *file_find_dif(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_i
/* We can have a fsp->fh->fd == -1 here as it could be a stat open. */
if (fsp->dev == dev &&
fsp->inode == inode &&
- fsp->file_id == file_id ) {
+ fsp->fh->file_id == file_id ) {
if (count > 10) {
DLIST_PROMOTE(Files, fsp);
}
@@ -287,7 +287,7 @@ files_struct *file_find_dif(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_i
(fsp->oplock_type != FAKE_LEVEL_II_OPLOCK)) {
DEBUG(0,("file_find_dif: file %s dev = %x, inode = %.0f, file_id = %u \
oplock_type = %u is a stat open with oplock type !\n", fsp->fsp_name, (unsigned int)fsp->dev,
- (double)fsp->inode, (unsigned int)fsp->file_id,
+ (double)fsp->inode, (unsigned int)fsp->fh->file_id,
(unsigned int)fsp->oplock_type ));
smb_panic("file_find_dif\n");
}