summaryrefslogtreecommitdiffstats
path: root/source/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
commitfd6fa1d4eaf61783df74ee2da50d331477f06998 (patch)
tree7011e4b9a86d1fc652224fca2b1b9d3c0c804d88 /source/smbd/files.c
parentf66b9701b5c6bb6302fa11889adab6902cbaf2e3 (diff)
downloadsamba-fd6fa1d4eaf61783df74ee2da50d331477f06998.tar.gz
samba-fd6fa1d4eaf61783df74ee2da50d331477f06998.tar.xz
samba-fd6fa1d4eaf61783df74ee2da50d331477f06998.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
Diffstat (limited to 'source/smbd/files.c')
-rw-r--r--source/smbd/files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/files.c b/source/smbd/files.c
index ba4baa93b10..53207e876ea 100644
--- a/source/smbd/files.c
+++ b/source/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");
}