r23779: Change from v2 or later to v3 or later.
[bbaumbach/samba-autobuild/.git] / source3 / include / vfs.h
index 9a547b9ab0d26f34846f3d032fe154b4c5689ac5..fdba306c1fc598708785acb0a5bfb5673c29d9e9 100644 (file)
@@ -8,7 +8,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
 /* Changed to version 15 as we added the statvfs call. JRA */
 /* Changed to version 16 as we added the getlock call. JRA */
 /* Changed to version 17 as we removed redundant connection_struct parameters. --jpeach */
 /* Changed to version 15 as we added the statvfs call. JRA */
 /* Changed to version 16 as we added the getlock call. JRA */
 /* Changed to version 17 as we removed redundant connection_struct parameters. --jpeach */
-/* Changed to version 18 to add fsp parameter to the open call -- jpeach */
-/* Changed to version 19 to add kernel_flock call - jmcd */
-#define SMB_VFS_INTERFACE_VERSION 19
+/* Changed to version 18 to add fsp parameter to the open call -- jpeach 
+   Also include kernel_flock call - jmcd */
+/* Changed to version 19, kernel change notify has been merged 
+   Also included linux setlease call - jmcd */
+/* Changed to version 20, use ntimes call instead of utime (greater
+ * timestamp resolition. JRA. */
+/* Changed to version21 to add chflags operation -- jpeach */
+/* Changed to version22 to add lchown operation -- jra */
+/* Leave at 22 - not yet released. But change set_nt_acl to return an NTSTATUS. jra. */
+#define SMB_VFS_INTERFACE_VERSION 22
 
 
 /* to bug old modules which are trying to compile with the old functions */
 
 
 /* to bug old modules which are trying to compile with the old functions */
@@ -140,18 +147,22 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_FCHMOD,
        SMB_VFS_OP_CHOWN,
        SMB_VFS_OP_FCHOWN,
        SMB_VFS_OP_FCHMOD,
        SMB_VFS_OP_CHOWN,
        SMB_VFS_OP_FCHOWN,
+       SMB_VFS_OP_LCHOWN,
        SMB_VFS_OP_CHDIR,
        SMB_VFS_OP_GETWD,
        SMB_VFS_OP_CHDIR,
        SMB_VFS_OP_GETWD,
-       SMB_VFS_OP_UTIME,
+       SMB_VFS_OP_NTIMES,
        SMB_VFS_OP_FTRUNCATE,
        SMB_VFS_OP_LOCK,
        SMB_VFS_OP_KERNEL_FLOCK,
        SMB_VFS_OP_FTRUNCATE,
        SMB_VFS_OP_LOCK,
        SMB_VFS_OP_KERNEL_FLOCK,
+       SMB_VFS_OP_LINUX_SETLEASE,
        SMB_VFS_OP_GETLOCK,
        SMB_VFS_OP_SYMLINK,
        SMB_VFS_OP_READLINK,
        SMB_VFS_OP_LINK,
        SMB_VFS_OP_MKNOD,
        SMB_VFS_OP_REALPATH,
        SMB_VFS_OP_GETLOCK,
        SMB_VFS_OP_SYMLINK,
        SMB_VFS_OP_READLINK,
        SMB_VFS_OP_LINK,
        SMB_VFS_OP_MKNOD,
        SMB_VFS_OP_REALPATH,
+       SMB_VFS_OP_NOTIFY_WATCH,
+       SMB_VFS_OP_CHFLAGS,
 
        /* NT ACL operations. */
 
 
        /* NT ACL operations. */
 
@@ -263,25 +274,35 @@ struct vfs_ops {
                int (*fchmod)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, mode_t mode);
                int (*chown)(struct vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid);
                int (*fchown)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uid_t uid, gid_t gid);
                int (*fchmod)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, mode_t mode);
                int (*chown)(struct vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid);
                int (*fchown)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uid_t uid, gid_t gid);
+               int (*lchown)(struct vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid);
                int (*chdir)(struct vfs_handle_struct *handle, const char *path);
                char *(*getwd)(struct vfs_handle_struct *handle, char *buf);
                int (*chdir)(struct vfs_handle_struct *handle, const char *path);
                char *(*getwd)(struct vfs_handle_struct *handle, char *buf);
-               int (*utime)(struct vfs_handle_struct *handle, const char *path, struct utimbuf *times);
+               int (*ntimes)(struct vfs_handle_struct *handle, const char *path, const struct timespec ts[2]);
                int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T offset);
                BOOL (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
                int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 share_mode);
                int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T offset);
                BOOL (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
                int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 share_mode);
+               int (*linux_setlease)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int leasetype);
                BOOL (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
                int (*symlink)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
                int (*readlink)(struct vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz);
                int (*link)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
                int (*mknod)(struct vfs_handle_struct *handle, const char *path, mode_t mode, SMB_DEV_T dev);
                char *(*realpath)(struct vfs_handle_struct *handle, const char *path, char *resolved_path);
                BOOL (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
                int (*symlink)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
                int (*readlink)(struct vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz);
                int (*link)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
                int (*mknod)(struct vfs_handle_struct *handle, const char *path, mode_t mode, SMB_DEV_T dev);
                char *(*realpath)(struct vfs_handle_struct *handle, const char *path, char *resolved_path);
+               NTSTATUS (*notify_watch)(struct vfs_handle_struct *handle,
+                                        struct sys_notify_context *ctx,
+                                        struct notify_entry *e,
+                                        void (*callback)(struct sys_notify_context *ctx, 
+                                                         void *private_data,
+                                                         struct notify_event *ev),
+                                        void *private_data, void *handle_p);
+               int (*chflags)(struct vfs_handle_struct *handle, const char *path, uint flags);
                
                /* NT ACL operations. */
                
                size_t (*fget_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd,  uint32 security_info, struct security_descriptor **ppdesc);
                size_t (*get_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name,  uint32 security_info, struct security_descriptor **ppdesc);
                
                /* NT ACL operations. */
                
                size_t (*fget_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd,  uint32 security_info, struct security_descriptor **ppdesc);
                size_t (*get_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name,  uint32 security_info, struct security_descriptor **ppdesc);
-               BOOL (*fset_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor *psd);
-               BOOL (*set_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor *psd);
+               NTSTATUS (*fset_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor *psd);
+               NTSTATUS (*set_nt_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor *psd);
                
                /* POSIX ACL operations. */
                
                
                /* POSIX ACL operations. */
                
@@ -378,18 +399,22 @@ struct vfs_ops {
                struct vfs_handle_struct *fchmod;
                struct vfs_handle_struct *chown;
                struct vfs_handle_struct *fchown;
                struct vfs_handle_struct *fchmod;
                struct vfs_handle_struct *chown;
                struct vfs_handle_struct *fchown;
+               struct vfs_handle_struct *lchown;
                struct vfs_handle_struct *chdir;
                struct vfs_handle_struct *getwd;
                struct vfs_handle_struct *chdir;
                struct vfs_handle_struct *getwd;
-               struct vfs_handle_struct *utime;
+               struct vfs_handle_struct *ntimes;
                struct vfs_handle_struct *ftruncate;
                struct vfs_handle_struct *lock;
                struct vfs_handle_struct *kernel_flock;
                struct vfs_handle_struct *ftruncate;
                struct vfs_handle_struct *lock;
                struct vfs_handle_struct *kernel_flock;
+               struct vfs_handle_struct *linux_setlease;
                struct vfs_handle_struct *getlock;
                struct vfs_handle_struct *symlink;
                struct vfs_handle_struct *readlink;
                struct vfs_handle_struct *link;
                struct vfs_handle_struct *mknod;
                struct vfs_handle_struct *realpath;
                struct vfs_handle_struct *getlock;
                struct vfs_handle_struct *symlink;
                struct vfs_handle_struct *readlink;
                struct vfs_handle_struct *link;
                struct vfs_handle_struct *mknod;
                struct vfs_handle_struct *realpath;
+               struct vfs_handle_struct *notify_watch;
+               struct vfs_handle_struct *chflags;
 
                /* NT ACL operations. */
 
 
                /* NT ACL operations. */