diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-08 03:54:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:40 -0500 |
commit | 19fc6e8f511f028aa40122cc7e40c83908d07ebe (patch) | |
tree | 43fe216bd4812568fc39a01e72ec777bf398066d /source4/ntvfs/posix/vfs_posix.h | |
parent | ce51a06f029e78212b3f02e1433f050bec394152 (diff) | |
download | samba-19fc6e8f511f028aa40122cc7e40c83908d07ebe.tar.gz samba-19fc6e8f511f028aa40122cc7e40c83908d07ebe.tar.bz2 samba-19fc6e8f511f028aa40122cc7e40c83908d07ebe.zip |
r3615: split out struct pvfs_file_handle from struct pvfs_file. This is in
preparation for adding code to pass the BASE-DENY1 and BASE-DENYDOS
tests, which require a shared filesystem handle for some specific
combinations of two DENY_DOS opens on the same connection.
(This used to be commit 6e4fdf01d19051e3923d7703dbf990fc1722b09a)
Diffstat (limited to 'source4/ntvfs/posix/vfs_posix.h')
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.h | 56 |
1 files changed, 35 insertions, 21 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h index 91940e6355..3f74de4b63 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -84,12 +84,45 @@ struct pvfs_filename { }; +/* open file handle state - encapsulates the posix fd + + Note that this is separated from the pvfs_file structure in order + to cope with the openx DENY_DOS semantics where a 2nd DENY_DOS open + on the same connection gets the same low level filesystem handle, + rather than a new handle +*/ +struct pvfs_file_handle { + int fd; + + struct pvfs_filename *name; + + /* a unique file key to be used for file locking */ + DATA_BLOB locking_key; + + uint32_t create_options; + uint32_t share_access; + uint32_t access_mask; + + /* this is set by the mode_information level. What does it do? */ + uint32_t mode; + + /* yes, we need 2 independent positions ... */ + uint64_t seek_offset; + uint64_t position; + + BOOL have_opendb_entry; + + /* we need this hook back to our parent for lock destruction */ + struct pvfs_state *pvfs; +}; + /* open file state */ struct pvfs_file { struct pvfs_file *next, *prev; - int fd; + struct pvfs_file_handle *handle; uint16_t fnum; - struct pvfs_filename *name; + + struct pvfs_state *pvfs; /* we need to remember the session it was opened on, as it is illegal to operate on someone elses fnum */ @@ -99,31 +132,12 @@ struct pvfs_file { opened the file so SMBexit works */ uint16_t smbpid; - /* a unique file key to be used for file locking */ - DATA_BLOB locking_key; - - /* we need this hook back to our parent for lock destruction */ - struct pvfs_state *pvfs; - /* a list of pending locks - used for locking cancel operations */ struct pvfs_pending_lock *pending_list; /* a count of active locks - used to avoid calling brl_close on file close */ uint64_t lock_count; - - uint32_t create_options; - uint32_t share_access; - uint32_t access_mask; - - /* this is set by the mode_information level. What does it do? */ - uint32_t mode; - - /* yes, we need 2 independent positions ... */ - uint64_t seek_offset; - uint64_t position; - - BOOL have_opendb_entry; }; |