diff options
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; }; |