Merge commit 'release-4-0-0alpha15' into master4-tmp
[ira/wip.git] / source4 / ntvfs / posix / vfs_posix.h
index cf39bcf0ac0db318f0246dec8a65638b71f105db..e1593a38cf578c583960510c506226e360966bb1 100644 (file)
@@ -27,7 +27,7 @@
 #include "ntvfs/ntvfs.h"
 #include "ntvfs/common/ntvfs_common.h"
 #include "libcli/wbclient/wbclient.h"
-#include "dsdb/samdb/samdb.h"
+#include "lib/events/events.h"
 
 struct pvfs_wait;
 struct pvfs_oplock;
@@ -40,7 +40,7 @@ struct pvfs_state {
        struct GUID *base_fs_uuid;
 
        const char *share_name;
-       uint_t flags;
+       unsigned int flags;
 
        struct pvfs_mangle_context *mangle_ctx;
 
@@ -54,13 +54,13 @@ struct pvfs_state {
        struct pvfs_wait *wait_list;
 
        /* the sharing violation timeout (nsecs) */
-       uint_t sharing_violation_delay;
+       unsigned int sharing_violation_delay;
 
        /* the oplock break timeout (secs) */
-       uint_t oplock_break_timeout;
+       unsigned int oplock_break_timeout;
 
        /* the write time update delay (nsecs) */
-       uint_t writetime_delay;
+       unsigned int writetime_delay;
 
        /* filesystem attributes (see FS_ATTR_*) */
        uint32_t fs_attribs;
@@ -84,7 +84,7 @@ struct pvfs_state {
                struct pvfs_search_state *list;
 
                /* how long to keep inactive searches around for */
-               uint_t inactivity_time;
+               unsigned int inactivity_time;
        } search;
 
        /* used to accelerate acl mapping */
@@ -124,9 +124,9 @@ struct pvfs_dos_fileinfo {
   a filename passed by the client to any function
 */
 struct pvfs_filename {
-       const char *original_name;
+       char *original_name;
        char *full_name;
-       const char *stream_name; /* does not include :$DATA suffix */
+       char *stream_name; /* does not include :$DATA suffix */
        uint32_t stream_id;      /* this uses a hash, so is probabilistic */
        bool has_wildcard;
        bool exists;          /* true if the base filename exists */
@@ -174,7 +174,7 @@ struct pvfs_file_handle {
 
        struct {
                bool update_triggered;
-               struct timed_event *update_event;
+               struct tevent_timer *update_event;
                bool update_on_close;
                NTTIME close_time;
                bool update_forced;
@@ -182,6 +182,8 @@ struct pvfs_file_handle {
 
        /* the open went through to completion */
        bool open_completed;
+
+       uint8_t private_flags;
 };
 
 /* open file state */
@@ -202,7 +204,7 @@ struct pvfs_file {
        /* a file handle to be used for byte range locking */
        struct brl_handle *brl_handle;
 
-       /* a count of active locks - used to avoid calling brl_close on
+       /* a count of active locks - used to avoid calling brlock_close on
           file close */
        uint64_t lock_count;
 
@@ -222,10 +224,10 @@ struct pvfs_search_state {
        uint16_t search_attrib;
        uint16_t must_attrib;
        struct pvfs_dir *dir;
-       time_t last_used;
-       uint_t num_ea_names;
+       time_t last_used; /* monotonic clock time */
+       unsigned int num_ea_names;
        struct ea_name *ea_names;
-       struct timed_event *te;
+       struct tevent_timer *te;
 };
 
 /* flags to pvfs_resolve_name() */
@@ -244,6 +246,7 @@ struct pvfs_search_state {
 #define PVFS_FLAG_XATTR_ENABLE   (1<<7)
 #define PVFS_FLAG_FAKE_OPLOCKS   (1<<8)
 #define PVFS_FLAG_LINUX_AIO      (1<<9)
+#define PVFS_FLAG_PERM_OVERRIDE  (1<<10)
 
 /* forward declare some anonymous structures */
 struct pvfs_dir;
@@ -266,6 +269,7 @@ struct pvfs_odb_retry;
 #define PVFS_SEARCH_INACTIVITY         "posix:searchinactivity"
 #define PVFS_ACL                       "posix:acl"
 #define PVFS_AIO                       "posix:aio"
+#define PVFS_PERM_OVERRIDE             "posix:permission override"
 
 #define PVFS_XATTR_DEFAULT                     true
 #define PVFS_FAKE_OPLOCKS_DEFAULT              false
@@ -283,6 +287,7 @@ struct pvfs_acl_ops {
 };
 
 #include "ntvfs/posix/vfs_posix_proto.h"
+#include "ntvfs/posix/vfs_acl_proto.h"
 
 NTSTATUS pvfs_aio_pread(struct ntvfs_request *req, union smb_read *rd,
                        struct pvfs_file *f, uint32_t maxcnt);