summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h3
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/include/vfs.h887
-rw-r--r--source3/include/vfs_macros.h951
-rw-r--r--source3/lib/file_id.c8
-rw-r--r--source3/libsmb/libsmb_xattr.c6
-rw-r--r--source3/locking/brlock.c30
-rw-r--r--source3/locking/posix.c16
-rw-r--r--source3/modules/vfs_acl_tdb.c37
-rw-r--r--source3/modules/vfs_acl_xattr.c28
-rw-r--r--source3/modules/vfs_afsacl.c19
-rw-r--r--source3/modules/vfs_aio_fork.c23
-rw-r--r--source3/modules/vfs_aixacl.c35
-rw-r--r--source3/modules/vfs_aixacl2.c53
-rw-r--r--source3/modules/vfs_audit.c45
-rw-r--r--source3/modules/vfs_cacheprime.c20
-rw-r--r--source3/modules/vfs_cap.c98
-rw-r--r--source3/modules/vfs_catia.c48
-rw-r--r--source3/modules/vfs_commit.c26
-rw-r--r--source3/modules/vfs_default.c365
-rw-r--r--source3/modules/vfs_default_quota.c13
-rw-r--r--source3/modules/vfs_dirsort.c27
-rw-r--r--source3/modules/vfs_expand_msdfs.c10
-rw-r--r--source3/modules/vfs_extd_audit.c45
-rw-r--r--source3/modules/vfs_fake_perms.c13
-rw-r--r--source3/modules/vfs_fileid.c34
-rw-r--r--source3/modules/vfs_full_audit.c356
-rw-r--r--source3/modules/vfs_gpfs.c105
-rw-r--r--source3/modules/vfs_hpuxacl.c33
-rw-r--r--source3/modules/vfs_irixacl.c33
-rw-r--r--source3/modules/vfs_netatalk.c29
-rw-r--r--source3/modules/vfs_notify_fam.c14
-rw-r--r--source3/modules/vfs_onefs.c110
-rw-r--r--source3/modules/vfs_onefs_shadow_copy.c149
-rw-r--r--source3/modules/vfs_posixacl.c33
-rw-r--r--source3/modules/vfs_prealloc.c11
-rw-r--r--source3/modules/vfs_preopen.c11
-rw-r--r--source3/modules/vfs_readahead.c19
-rw-r--r--source3/modules/vfs_readonly.c11
-rw-r--r--source3/modules/vfs_recycle.c21
-rw-r--r--source3/modules/vfs_shadow_copy.c28
-rw-r--r--source3/modules/vfs_shadow_copy2.c87
-rw-r--r--source3/modules/vfs_smb_traffic_analyzer.c26
-rw-r--r--source3/modules/vfs_solarisacl.c35
-rw-r--r--source3/modules/vfs_streams_depot.c28
-rw-r--r--source3/modules/vfs_streams_xattr.c40
-rw-r--r--source3/modules/vfs_syncops.c30
-rw-r--r--source3/modules/vfs_tru64acl.c33
-rw-r--r--source3/modules/vfs_tsmsm.c39
-rw-r--r--source3/modules/vfs_xattr_tdb.c40
-rw-r--r--source3/modules/vfs_zfsacl.c37
-rw-r--r--source3/smbd/vfs.c870
-rw-r--r--source3/utils/net.c1
53 files changed, 2660 insertions, 2411 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 77283d9cf0a..63a82a8c229 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -7086,7 +7086,8 @@ void sys_utmp_claim(const char *username, const char *hostname,
/* The following definitions come from smbd/vfs.c */
-NTSTATUS smb_register_vfs(int version, const char *name, const vfs_op_tuple *vfs_op_tuples);
+NTSTATUS smb_register_vfs(int version, const char *name,
+ const struct vfs_fn_pointers *fns);
bool vfs_init_custom(connection_struct *conn, const char *vfs_object);
void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle,
files_struct *fsp, size_t ext_size,
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 94ed2186fbd..1c4ac547228 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -560,8 +560,6 @@ typedef struct connection_struct {
char *connectpath;
char *origpath;
- struct vfs_ops vfs; /* Filesystem operations */
- struct vfs_ops vfs_opaque; /* OPAQUE Filesystem operations */
struct vfs_handle_struct *vfs_handles; /* for the new plugins */
/*
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 91bda47ac65..545bd9b6d98 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -150,6 +150,10 @@ struct smb_file_time;
struct blocking_lock_record;
struct smb_filename;
+#define VFS_FIND(__fn__) while (handle->fns->__fn__==NULL) { \
+ handle = handle->next; \
+ }
+
/*
Available VFS operations. These values must be in sync with vfs_ops struct
(struct vfs_fn_pointers and struct vfs_handle_pointers inside of struct vfs_ops).
@@ -299,388 +303,213 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_LAST
} vfs_op_type;
-/*
- Please keep vfs_op_type, struct vfs_fn_pointers and struct vfs_handles_pointers in sync.
-*/
-struct vfs_ops {
- struct vfs_fn_pointers {
- /* Disk operations */
-
- int (*connect_fn)(struct vfs_handle_struct *handle, const char *service, const char *user);
- void (*disconnect)(struct vfs_handle_struct *handle);
- uint64_t (*disk_free)(struct vfs_handle_struct *handle, const char *path, bool small_query, uint64_t *bsize,
- uint64_t *dfree, uint64_t *dsize);
- int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
- int (*set_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
- int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels);
- int (*statvfs)(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf);
- uint32_t (*fs_capabilities)(struct vfs_handle_struct *handle);
-
- /* Directory operations */
-
- SMB_STRUCT_DIR *(*opendir)(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attributes);
- SMB_STRUCT_DIRENT *(*readdir)(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
- SMB_STRUCT_STAT *sbuf);
- void (*seekdir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset);
- long (*telldir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
- void (*rewind_dir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
- int (*mkdir)(struct vfs_handle_struct *handle, const char *path, mode_t mode);
- int (*rmdir)(struct vfs_handle_struct *handle, const char *path);
- int (*closedir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dir);
- void (*init_search_op)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
-
- /* File operations */
-
- int (*open)(struct vfs_handle_struct *handle,
- struct smb_filename *smb_fname, files_struct *fsp,
- int flags, mode_t mode);
- NTSTATUS (*create_file)(struct vfs_handle_struct *handle,
- struct smb_request *req,
- uint16_t root_dir_fid,
- struct smb_filename *smb_fname,
- uint32_t access_mask,
- uint32_t share_access,
- uint32_t create_disposition,
- uint32_t create_options,
- uint32_t file_attributes,
- uint32_t oplock_request,
- uint64_t allocation_size,
- struct security_descriptor *sd,
- struct ea_list *ea_list,
- files_struct **result,
- int *pinfo);
- int (*close_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp);
- ssize_t (*vfs_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n);
- ssize_t (*pread)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n, SMB_OFF_T offset);
- ssize_t (*write)(struct vfs_handle_struct *handle, struct files_struct *fsp, const void *data, size_t n);
- ssize_t (*pwrite)(struct vfs_handle_struct *handle, struct files_struct *fsp, const void *data, size_t n, SMB_OFF_T offset);
- SMB_OFF_T (*lseek)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_OFF_T offset, int whence);
- ssize_t (*sendfile)(struct vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
- ssize_t (*recvfile)(struct vfs_handle_struct *handle, int fromfd, files_struct *tofsp, SMB_OFF_T offset, size_t count);
- int (*rename)(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname_src,
- const struct smb_filename *smb_fname_dst);
- int (*fsync)(struct vfs_handle_struct *handle, struct files_struct *fsp);
- int (*stat)(struct vfs_handle_struct *handle, struct smb_filename *smb_fname);
- int (*fstat)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_STAT *sbuf);
- int (*lstat)(struct vfs_handle_struct *handle, struct smb_filename *smb_filename);
- uint64_t (*get_alloc_size)(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_STAT *sbuf);
- int (*unlink)(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname);
- int (*chmod)(struct vfs_handle_struct *handle, const char *path, mode_t mode);
- int (*fchmod)(struct vfs_handle_struct *handle, struct files_struct *fsp, 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, 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 (*ntimes)(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- struct smb_file_time *ft);
- int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_OFF_T offset);
- bool (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
- int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32 share_mode);
- int (*linux_setlease)(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype);
- bool (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, 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 (*vfs_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, unsigned int flags);
- struct file_id (*file_id_create)(struct vfs_handle_struct *handle,
- const SMB_STRUCT_STAT *sbuf);
-
- NTSTATUS (*streaminfo)(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- const char *fname,
- TALLOC_CTX *mem_ctx,
- unsigned int *num_streams,
- struct stream_struct **streams);
-
- int (*get_real_filename)(struct vfs_handle_struct *handle,
- const char *path,
- const char *name,
- TALLOC_CTX *mem_ctx,
- char **found_name);
-
- const char *(*connectpath)(struct vfs_handle_struct *handle,
- const char *filename);
-
- NTSTATUS (*brl_lock_windows)(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock,
- struct blocking_lock_record *blr);
-
- bool (*brl_unlock_windows)(struct vfs_handle_struct *handle,
- struct messaging_context *msg_ctx,
- struct byte_range_lock *br_lck,
- const struct lock_struct *plock);
-
- bool (*brl_cancel_windows)(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- struct blocking_lock_record *blr);
-
- bool (*strict_lock)(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- struct lock_struct *plock);
-
- void (*strict_unlock)(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- struct lock_struct *plock);
-
- /* NT ACL operations. */
-
- NTSTATUS (*fget_nt_acl)(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- uint32 security_info,
- struct security_descriptor **ppdesc);
- NTSTATUS (*get_nt_acl)(struct vfs_handle_struct *handle,
- const char *name,
- uint32 security_info,
- struct security_descriptor **ppdesc);
- NTSTATUS (*fset_nt_acl)(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- uint32 security_info_sent,
- const struct security_descriptor *psd);
-
- /* POSIX ACL operations. */
-
- int (*chmod_acl)(struct vfs_handle_struct *handle, const char *name, mode_t mode);
- int (*fchmod_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode);
-
- int (*sys_acl_get_entry)(struct vfs_handle_struct *handle, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
- int (*sys_acl_get_tag_type)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
- int (*sys_acl_get_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
- void * (*sys_acl_get_qualifier)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d);
- SMB_ACL_T (*sys_acl_get_file)(struct vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type);
- SMB_ACL_T (*sys_acl_get_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp);
- int (*sys_acl_clear_perms)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset);
- int (*sys_acl_add_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
- char * (*sys_acl_to_text)(struct vfs_handle_struct *handle, SMB_ACL_T theacl, ssize_t *plen);
- SMB_ACL_T (*sys_acl_init)(struct vfs_handle_struct *handle, int count);
- int (*sys_acl_create_entry)(struct vfs_handle_struct *handle, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
- int (*sys_acl_set_tag_type)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
- int (*sys_acl_set_qualifier)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, void *qual);
- int (*sys_acl_set_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
- int (*sys_acl_valid)(struct vfs_handle_struct *handle, SMB_ACL_T theacl );
- int (*sys_acl_set_file)(struct vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
- int (*sys_acl_set_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_T theacl);
- int (*sys_acl_delete_def_file)(struct vfs_handle_struct *handle, const char *path);
- int (*sys_acl_get_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
- int (*sys_acl_free_text)(struct vfs_handle_struct *handle, char *text);
- int (*sys_acl_free_acl)(struct vfs_handle_struct *handle, SMB_ACL_T posix_acl);
- int (*sys_acl_free_qualifier)(struct vfs_handle_struct *handle, void *qualifier, SMB_ACL_TAG_T tagtype);
-
- /* EA operations. */
- ssize_t (*getxattr)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
- ssize_t (*lgetxattr)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
- ssize_t (*fgetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size);
- ssize_t (*listxattr)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
- ssize_t (*llistxattr)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
- ssize_t (*flistxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
- int (*removexattr)(struct vfs_handle_struct *handle, const char *path, const char *name);
- int (*lremovexattr)(struct vfs_handle_struct *handle, const char *path, const char *name);
- int (*fremovexattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name);
- int (*setxattr)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
- int (*lsetxattr)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
- int (*fsetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);
-
- /* aio operations */
- int (*aio_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
- int (*aio_write)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
- ssize_t (*aio_return_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
- int (*aio_cancel)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
- int (*aio_error_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
- int (*aio_fsync)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
- int (*aio_suspend)(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *timeout);
- bool (*aio_force)(struct vfs_handle_struct *handle, struct files_struct *fsp);
-
- /* offline operations */
- bool (*is_offline)(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf);
- int (*set_offline)(struct vfs_handle_struct *handle, const char *path);
- } ops;
-
- struct vfs_handles_pointers {
- /* Disk operations */
-
- struct vfs_handle_struct *connect_hnd;
- struct vfs_handle_struct *disconnect;
- struct vfs_handle_struct *disk_free;
- struct vfs_handle_struct *get_quota;
- struct vfs_handle_struct *set_quota;
- struct vfs_handle_struct *get_shadow_copy_data;
- struct vfs_handle_struct *statvfs;
- struct vfs_handle_struct *fs_capabilities;
-
- /* Directory operations */
-
- struct vfs_handle_struct *opendir;
- struct vfs_handle_struct *readdir;
- struct vfs_handle_struct *seekdir;
- struct vfs_handle_struct *telldir;
- struct vfs_handle_struct *rewind_dir;
- struct vfs_handle_struct *mkdir;
- struct vfs_handle_struct *rmdir;
- struct vfs_handle_struct *closedir;
- struct vfs_handle_struct *init_search_op;
-
- /* File operations */
-
- struct vfs_handle_struct *open;
- struct vfs_handle_struct *create_file;
- struct vfs_handle_struct *close_hnd;
- struct vfs_handle_struct *vfs_read;
- struct vfs_handle_struct *pread;
- struct vfs_handle_struct *write;
- struct vfs_handle_struct *pwrite;
- struct vfs_handle_struct *lseek;
- struct vfs_handle_struct *sendfile;
- struct vfs_handle_struct *recvfile;
- struct vfs_handle_struct *rename;
- struct vfs_handle_struct *fsync;
- struct vfs_handle_struct *stat;
- struct vfs_handle_struct *fstat;
- struct vfs_handle_struct *lstat;
- struct vfs_handle_struct *get_alloc_size;
- struct vfs_handle_struct *unlink;
- struct vfs_handle_struct *chmod;
- 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 *ntimes;
- 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 *vfs_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;
- struct vfs_handle_struct *file_id_create;
- struct vfs_handle_struct *streaminfo;
- struct vfs_handle_struct *get_real_filename;
- struct vfs_handle_struct *connectpath;
- struct vfs_handle_struct *brl_lock_windows;
- struct vfs_handle_struct *brl_unlock_windows;
- struct vfs_handle_struct *brl_cancel_windows;
- struct vfs_handle_struct *strict_lock;
- struct vfs_handle_struct *strict_unlock;
-
- /* NT ACL operations. */
-
- struct vfs_handle_struct *fget_nt_acl;
- struct vfs_handle_struct *get_nt_acl;
- struct vfs_handle_struct *fset_nt_acl;
-
- /* POSIX ACL operations. */
-
- struct vfs_handle_struct *chmod_acl;
- struct vfs_handle_struct *fchmod_acl;
-
- struct vfs_handle_struct *sys_acl_get_entry;
- struct vfs_handle_struct *sys_acl_get_tag_type;
- struct vfs_handle_struct *sys_acl_get_permset;
- struct vfs_handle_struct *sys_acl_get_qualifier;
- struct vfs_handle_struct *sys_acl_get_file;
- struct vfs_handle_struct *sys_acl_get_fd;
- struct vfs_handle_struct *sys_acl_clear_perms;
- struct vfs_handle_struct *sys_acl_add_perm;
- struct vfs_handle_struct *sys_acl_to_text;
- struct vfs_handle_struct *sys_acl_init;
- struct vfs_handle_struct *sys_acl_create_entry;
- struct vfs_handle_struct *sys_acl_set_tag_type;
- struct vfs_handle_struct *sys_acl_set_qualifier;
- struct vfs_handle_struct *sys_acl_set_permset;
- struct vfs_handle_struct *sys_acl_valid;
- struct vfs_handle_struct *sys_acl_set_file;
- struct vfs_handle_struct *sys_acl_set_fd;
- struct vfs_handle_struct *sys_acl_delete_def_file;
- struct vfs_handle_struct *sys_acl_get_perm;
- struct vfs_handle_struct *sys_acl_free_text;
- struct vfs_handle_struct *sys_acl_free_acl;
- struct vfs_handle_struct *sys_acl_free_qualifier;
-
- /* EA operations. */
- struct vfs_handle_struct *getxattr;
- struct vfs_handle_struct *lgetxattr;
- struct vfs_handle_struct *fgetxattr;
- struct vfs_handle_struct *listxattr;
- struct vfs_handle_struct *llistxattr;
- struct vfs_handle_struct *flistxattr;
- struct vfs_handle_struct *removexattr;
- struct vfs_handle_struct *lremovexattr;
- struct vfs_handle_struct *fremovexattr;
- struct vfs_handle_struct *setxattr;
- struct vfs_handle_struct *lsetxattr;
- struct vfs_handle_struct *fsetxattr;
-
- /* aio operations */
- struct vfs_handle_struct *aio_read;
- struct vfs_handle_struct *aio_write;
- struct vfs_handle_struct *aio_return;
- struct vfs_handle_struct *aio_cancel;
- struct vfs_handle_struct *aio_error;
- struct vfs_handle_struct *aio_fsync;
- struct vfs_handle_struct *aio_suspend;
- struct vfs_handle_struct *aio_force;
-
- /* offline operations */
- struct vfs_handle_struct *is_offline;
- struct vfs_handle_struct *set_offline;
- } handles;
-};
+struct vfs_fn_pointers {
+ /* Disk operations */
-/*
- Possible VFS operation layers (per-operation)
+ int (*connect_fn)(struct vfs_handle_struct *handle, const char *service, const char *user);
+ void (*disconnect)(struct vfs_handle_struct *handle);
+ uint64_t (*disk_free)(struct vfs_handle_struct *handle, const char *path, bool small_query, uint64_t *bsize,
+ uint64_t *dfree, uint64_t *dsize);
+ int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
+ int (*set_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
+ int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels);
+ int (*statvfs)(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf);
+ uint32_t (*fs_capabilities)(struct vfs_handle_struct *handle);
- These values are used by VFS subsystem when building vfs_ops for connection
- from multiple VFS modules. Internally, Samba differentiates only opaque and
- transparent layers at this process. Other types are used for providing better
- diagnosing facilities.
+ /* Directory operations */
- Most modules will provide transparent layers. Opaque layer is for modules
- which implement actual file system calls (like DB-based VFS). For example,
- default POSIX VFS which is built in into Samba is an opaque VFS module.
+ SMB_STRUCT_DIR *(*opendir)(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attributes);
+ SMB_STRUCT_DIRENT *(*readdir)(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp,
+ SMB_STRUCT_STAT *sbuf);
+ void (*seekdir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset);
+ long (*telldir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
+ void (*rewind_dir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
+ int (*mkdir)(struct vfs_handle_struct *handle, const char *path, mode_t mode);
+ int (*rmdir)(struct vfs_handle_struct *handle, const char *path);
+ int (*closedir)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dir);
+ void (*init_search_op)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
- Other layer types (audit, splitter, scanner) were designed to provide different
- degree of transparency and for diagnosing VFS module behaviour.
+ /* File operations */
- Each module can implement several layers at the same time provided that only
- one layer is used per each operation.
+ int (*open)(struct vfs_handle_struct *handle,
+ struct smb_filename *smb_fname, files_struct *fsp,
+ int flags, mode_t mode);
+ NTSTATUS (*create_file)(struct vfs_handle_struct *handle,
+ struct smb_request *req,
+ uint16_t root_dir_fid,
+ struct smb_filename *smb_fname,
+ uint32_t access_mask,
+ uint32_t share_access,
+ uint32_t create_disposition,
+ uint32_t create_options,
+ uint32_t file_attributes,
+ uint32_t oplock_request,
+ uint64_t allocation_size,
+ struct security_descriptor *sd,
+ struct ea_list *ea_list,
+ files_struct **result,
+ int *pinfo);
+ int (*close_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp);
+ ssize_t (*vfs_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n);
+ ssize_t (*pread)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n, SMB_OFF_T offset);
+ ssize_t (*write)(struct vfs_handle_struct *handle, struct files_struct *fsp, const void *data, size_t n);
+ ssize_t (*pwrite)(struct vfs_handle_struct *handle, struct files_struct *fsp, const void *data, size_t n, SMB_OFF_T offset);
+ SMB_OFF_T (*lseek)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_OFF_T offset, int whence);
+ ssize_t (*sendfile)(struct vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
+ ssize_t (*recvfile)(struct vfs_handle_struct *handle, int fromfd, files_struct *tofsp, SMB_OFF_T offset, size_t count);
+ int (*rename)(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname_src,
+ const struct smb_filename *smb_fname_dst);
+ int (*fsync)(struct vfs_handle_struct *handle, struct files_struct *fsp);
+ int (*stat)(struct vfs_handle_struct *handle, struct smb_filename *smb_fname);
+ int (*fstat)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_STAT *sbuf);
+ int (*lstat)(struct vfs_handle_struct *handle, struct smb_filename *smb_filename);
+ uint64_t (*get_alloc_size)(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_STAT *sbuf);
+ int (*unlink)(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname);
+ int (*chmod)(struct vfs_handle_struct *handle, const char *path, mode_t mode);
+ int (*fchmod)(struct vfs_handle_struct *handle, struct files_struct *fsp, 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, 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 (*ntimes)(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname,
+ struct smb_file_time *ft);
+ int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_OFF_T offset);
+ bool (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
+ int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32 share_mode);
+ int (*linux_setlease)(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype);
+ bool (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, 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 (*vfs_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, unsigned int flags);
+ struct file_id (*file_id_create)(struct vfs_handle_struct *handle,
+ const SMB_STRUCT_STAT *sbuf);
+
+ NTSTATUS (*streaminfo)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const char *fname,
+ TALLOC_CTX *mem_ctx,
+ unsigned int *num_streams,
+ struct stream_struct **streams);
+
+ int (*get_real_filename)(struct vfs_handle_struct *handle,
+ const char *path,
+ const char *name,
+ TALLOC_CTX *mem_ctx,
+ char **found_name);
+
+ const char *(*connectpath)(struct vfs_handle_struct *handle,
+ const char *filename);
+
+ NTSTATUS (*brl_lock_windows)(struct vfs_handle_struct *handle,
+ struct byte_range_lock *br_lck,
+ struct lock_struct *plock,
+ bool blocking_lock,
+ struct blocking_lock_record *blr);
+
+ bool (*brl_unlock_windows)(struct vfs_handle_struct *handle,
+ struct messaging_context *msg_ctx,
+ struct byte_range_lock *br_lck,
+ const struct lock_struct *plock);
+
+ bool (*brl_cancel_windows)(struct vfs_handle_struct *handle,
+ struct byte_range_lock *br_lck,
+ struct lock_struct *plock,
+ struct blocking_lock_record *blr);
+
+ bool (*strict_lock)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ struct lock_struct *plock);
+
+ void (*strict_unlock)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ struct lock_struct *plock);
-*/
+ /* NT ACL operations. */
+
+ NTSTATUS (*fget_nt_acl)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32 security_info,
+ struct security_descriptor **ppdesc);
+ NTSTATUS (*get_nt_acl)(struct vfs_handle_struct *handle,
+ const char *name,
+ uint32 security_info,
+ struct security_descriptor **ppdesc);
+ NTSTATUS (*fset_nt_acl)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32 security_info_sent,
+ const struct security_descriptor *psd);
-typedef enum _vfs_op_layer {
- SMB_VFS_LAYER_NOOP = -1, /* - For using in VFS module to indicate end of array */
- /* of operations description */
- SMB_VFS_LAYER_OPAQUE = 0, /* - Final level, does not call anything beyond itself */
- SMB_VFS_LAYER_TRANSPARENT, /* - Normal operation, calls underlying layer after */
- /* possibly changing passed data */
- SMB_VFS_LAYER_LOGGER, /* - Logs data, calls underlying layer, logging may not */
- /* use Samba VFS */
- SMB_VFS_LAYER_SPLITTER, /* - Splits operation, calls underlying layer _and_ own facility, */
- /* then combines result */
- SMB_VFS_LAYER_SCANNER /* - Checks data and possibly initiates additional */
- /* file activity like logging to files _inside_ samba VFS */
-} vfs_op_layer;
+ /* POSIX ACL operations. */
+
+ int (*chmod_acl)(struct vfs_handle_struct *handle, const char *name, mode_t mode);
+ int (*fchmod_acl)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode);
+
+ int (*sys_acl_get_entry)(struct vfs_handle_struct *handle, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
+ int (*sys_acl_get_tag_type)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
+ int (*sys_acl_get_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
+ void * (*sys_acl_get_qualifier)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d);
+ SMB_ACL_T (*sys_acl_get_file)(struct vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type);
+ SMB_ACL_T (*sys_acl_get_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp);
+ int (*sys_acl_clear_perms)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset);
+ int (*sys_acl_add_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
+ char * (*sys_acl_to_text)(struct vfs_handle_struct *handle, SMB_ACL_T theacl, ssize_t *plen);
+ SMB_ACL_T (*sys_acl_init)(struct vfs_handle_struct *handle, int count);
+ int (*sys_acl_create_entry)(struct vfs_handle_struct *handle, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
+ int (*sys_acl_set_tag_type)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
+ int (*sys_acl_set_qualifier)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, void *qual);
+ int (*sys_acl_set_permset)(struct vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
+ int (*sys_acl_valid)(struct vfs_handle_struct *handle, SMB_ACL_T theacl );
+ int (*sys_acl_set_file)(struct vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
+ int (*sys_acl_set_fd)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_T theacl);
+ int (*sys_acl_delete_def_file)(struct vfs_handle_struct *handle, const char *path);
+ int (*sys_acl_get_perm)(struct vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
+ int (*sys_acl_free_text)(struct vfs_handle_struct *handle, char *text);
+ int (*sys_acl_free_acl)(struct vfs_handle_struct *handle, SMB_ACL_T posix_acl);
+ int (*sys_acl_free_qualifier)(struct vfs_handle_struct *handle, void *qualifier, SMB_ACL_TAG_T tagtype);
+
+ /* EA operations. */
+ ssize_t (*getxattr)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
+ ssize_t (*lgetxattr)(struct vfs_handle_struct *handle,const char *path, const char *name, void *value, size_t size);
+ ssize_t (*fgetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size);
+ ssize_t (*listxattr)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
+ ssize_t (*llistxattr)(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
+ ssize_t (*flistxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
+ int (*removexattr)(struct vfs_handle_struct *handle, const char *path, const char *name);
+ int (*lremovexattr)(struct vfs_handle_struct *handle, const char *path, const char *name);
+ int (*fremovexattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name);
+ int (*setxattr)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
+ int (*lsetxattr)(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags);
+ int (*fsetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);
+
+ /* aio operations */
+ int (*aio_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+ int (*aio_write)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+ ssize_t (*aio_return_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+ int (*aio_cancel)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+ int (*aio_error_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+ int (*aio_fsync)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
+ int (*aio_suspend)(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *timeout);
+ bool (*aio_force)(struct vfs_handle_struct *handle, struct files_struct *fsp);
+
+ /* offline operations */
+ bool (*is_offline)(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf);
+ int (*set_offline)(struct vfs_handle_struct *handle, const char *path);
+};
/*
VFS operation description. Each VFS module registers an array of vfs_op_tuple to VFS subsystem,
@@ -689,18 +518,11 @@ typedef enum _vfs_op_layer {
using this information.
*/
-typedef struct vfs_op_tuple {
- void* op;
- vfs_op_type type;
- vfs_op_layer layer;
-} vfs_op_tuple;
-
-
typedef struct vfs_handle_struct {
struct vfs_handle_struct *next, *prev;
const char *param;
- struct vfs_ops vfs_next;
struct connection_struct *conn;
+ const struct vfs_fn_pointers *fns;
void *data;
void (*free_data)(void **data);
} vfs_handle_struct;
@@ -788,4 +610,303 @@ typedef struct vfs_statvfs_struct {
#include "vfs_macros.h"
+int smb_vfs_call_connect(struct vfs_handle_struct *handle,
+ const char *service, const char *user);
+void smb_vfs_call_disconnect(struct vfs_handle_struct *handle);
+uint64_t smb_vfs_call_disk_free(struct vfs_handle_struct *handle,
+ const char *path, bool small_query,
+ uint64_t *bsize, uint64_t *dfree,
+ uint64_t *dsize);
+int smb_vfs_call_get_quota(struct vfs_handle_struct *handle,
+ enum SMB_QUOTA_TYPE qtype, unid_t id,
+ SMB_DISK_QUOTA *qt);
+int smb_vfs_call_set_quota(struct vfs_handle_struct *handle,
+ enum SMB_QUOTA_TYPE qtype, unid_t id,
+ SMB_DISK_QUOTA *qt);
+int smb_vfs_call_get_shadow_copy_data(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SHADOW_COPY_DATA *shadow_copy_data,
+ bool labels);
+int smb_vfs_call_statvfs(struct vfs_handle_struct *handle, const char *path,
+ struct vfs_statvfs_struct *statbuf);
+uint32_t smb_vfs_call_fs_capabilities(struct vfs_handle_struct *handle);
+SMB_STRUCT_DIR *smb_vfs_call_opendir(struct vfs_handle_struct *handle,
+ const char *fname, const char *mask,
+ uint32 attributes);
+SMB_STRUCT_DIRENT *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp,
+ SMB_STRUCT_STAT *sbuf);
+void smb_vfs_call_seekdir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp, long offset);
+long smb_vfs_call_telldir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp);
+void smb_vfs_call_rewind_dir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp);
+int smb_vfs_call_mkdir(struct vfs_handle_struct *handle, const char *path,
+ mode_t mode);
+int smb_vfs_call_rmdir(struct vfs_handle_struct *handle, const char *path);
+int smb_vfs_call_closedir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dir);
+void smb_vfs_call_init_search_op(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp);
+int smb_vfs_call_open(struct vfs_handle_struct *handle,
+ struct smb_filename *smb_fname, struct files_struct *fsp,
+ int flags, mode_t mode);
+NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle,
+ struct smb_request *req,
+ uint16_t root_dir_fid,
+ struct smb_filename *smb_fname,
+ uint32_t access_mask,
+ uint32_t share_access,
+ uint32_t create_disposition,
+ uint32_t create_options,
+ uint32_t file_attributes,
+ uint32_t oplock_request,
+ uint64_t allocation_size,
+ struct security_descriptor *sd,
+ struct ea_list *ea_list,
+ files_struct **result,
+ int *pinfo);
+int smb_vfs_call_close_fn(struct vfs_handle_struct *handle,
+ struct files_struct *fsp);
+ssize_t smb_vfs_call_vfs_read(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, void *data, size_t n);
+ssize_t smb_vfs_call_pread(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, void *data, size_t n,
+ SMB_OFF_T offset);
+ssize_t smb_vfs_call_write(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const void *data,
+ size_t n);
+ssize_t smb_vfs_call_pwrite(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const void *data,
+ size_t n, SMB_OFF_T offset);
+SMB_OFF_T smb_vfs_call_lseek(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_OFF_T offset,
+ int whence);
+ssize_t smb_vfs_call_sendfile(struct vfs_handle_struct *handle, int tofd,
+ files_struct *fromfsp, const DATA_BLOB *header,
+ SMB_OFF_T offset, size_t count);
+ssize_t smb_vfs_call_recvfile(struct vfs_handle_struct *handle, int fromfd,
+ files_struct *tofsp, SMB_OFF_T offset,
+ size_t count);
+int smb_vfs_call_rename(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname_src,
+ const struct smb_filename *smb_fname_dst);
+int smb_vfs_call_fsync(struct vfs_handle_struct *handle,
+ struct files_struct *fsp);
+int smb_vfs_call_stat(struct vfs_handle_struct *handle,
+ struct smb_filename *smb_fname);
+int smb_vfs_call_fstat(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_STRUCT_STAT *sbuf);
+int smb_vfs_call_lstat(struct vfs_handle_struct *handle,
+ struct smb_filename *smb_filename);
+uint64_t smb_vfs_call_get_alloc_size(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const SMB_STRUCT_STAT *sbuf);
+int smb_vfs_call_unlink(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname);
+int smb_vfs_call_chmod(struct vfs_handle_struct *handle, const char *path,
+ mode_t mode);
+int smb_vfs_call_fchmod(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, mode_t mode);
+int smb_vfs_call_chown(struct vfs_handle_struct *handle, const char *path,
+ uid_t uid, gid_t gid);
+int smb_vfs_call_fchown(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, uid_t uid, gid_t gid);
+int smb_vfs_call_lchown(struct vfs_handle_struct *handle, const char *path,
+ uid_t uid, gid_t gid);
+int smb_vfs_call_chdir(struct vfs_handle_struct *handle, const char *path);
+char *smb_vfs_call_getwd(struct vfs_handle_struct *handle, char *buf);
+int smb_vfs_call_ntimes(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname,
+ struct smb_file_time *ft);
+int smb_vfs_call_ftruncate(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_OFF_T offset);
+bool smb_vfs_call_lock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int op, SMB_OFF_T offset,
+ SMB_OFF_T count, int type);
+int smb_vfs_call_kernel_flock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, uint32 share_mode);
+int smb_vfs_call_linux_setlease(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int leasetype);
+bool smb_vfs_call_getlock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_OFF_T *poffset,
+ SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
+int smb_vfs_call_symlink(struct vfs_handle_struct *handle, const char *oldpath,
+ const char *newpath);
+int smb_vfs_call_vfs_readlink(struct vfs_handle_struct *handle,
+ const char *path, char *buf, size_t bufsiz);
+int smb_vfs_call_link(struct vfs_handle_struct *handle, const char *oldpath,
+ const char *newpath);
+int smb_vfs_call_mknod(struct vfs_handle_struct *handle, const char *path,
+ mode_t mode, SMB_DEV_T dev);
+char *smb_vfs_call_realpath(struct vfs_handle_struct *handle,
+ const char *path, char *resolved_path);
+NTSTATUS smb_vfs_call_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 smb_vfs_call_chflags(struct vfs_handle_struct *handle, const char *path,
+ unsigned int flags);
+struct file_id smb_vfs_call_file_id_create(struct vfs_handle_struct *handle,
+ const SMB_STRUCT_STAT *sbuf);
+NTSTATUS smb_vfs_call_streaminfo(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const char *fname,
+ TALLOC_CTX *mem_ctx,
+ unsigned int *num_streams,
+ struct stream_struct **streams);
+int smb_vfs_call_get_real_filename(struct vfs_handle_struct *handle,
+ const char *path, const char *name,
+ TALLOC_CTX *mem_ctx, char **found_name);
+const char *smb_vfs_call_connectpath(struct vfs_handle_struct *handle,
+ const char *filename);
+NTSTATUS smb_vfs_call_brl_lock_windows(struct vfs_handle_struct *handle,
+ struct byte_range_lock *br_lck,
+ struct lock_struct *plock,
+ bool blocking_lock,
+ struct blocking_lock_record *blr);
+bool smb_vfs_call_brl_unlock_windows(struct vfs_handle_struct *handle,
+ struct messaging_context *msg_ctx,
+ struct byte_range_lock *br_lck,
+ const struct lock_struct *plock);
+bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
+ struct byte_range_lock *br_lck,
+ struct lock_struct *plock,
+ struct blocking_lock_record *blr);
+bool smb_vfs_call_strict_lock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ struct lock_struct *plock);
+void smb_vfs_call_strict_unlock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ struct lock_struct *plock);
+NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32 security_info,
+ struct security_descriptor **ppdesc);
+NTSTATUS smb_vfs_call_get_nt_acl(struct vfs_handle_struct *handle,
+ const char *name,
+ uint32 security_info,
+ struct security_descriptor **ppdesc);
+NTSTATUS smb_vfs_call_fset_nt_acl(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32 security_info_sent,
+ const struct security_descriptor *psd);
+int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle, const char *name,
+ mode_t mode);
+int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, mode_t mode);
+int smb_vfs_call_sys_acl_get_entry(struct vfs_handle_struct *handle,
+ SMB_ACL_T theacl, int entry_id,
+ SMB_ACL_ENTRY_T *entry_p);
+int smb_vfs_call_sys_acl_get_tag_type(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry_d,
+ SMB_ACL_TAG_T *tag_type_p);
+int smb_vfs_call_sys_acl_get_permset(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry_d,
+ SMB_ACL_PERMSET_T *permset_p);
+void * smb_vfs_call_sys_acl_get_qualifier(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry_d);
+SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
+ const char *path_p,
+ SMB_ACL_TYPE_T type);
+SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
+ struct files_struct *fsp);
+int smb_vfs_call_sys_acl_clear_perms(struct vfs_handle_struct *handle,
+ SMB_ACL_PERMSET_T permset);
+int smb_vfs_call_sys_acl_add_perm(struct vfs_handle_struct *handle,
+ SMB_ACL_PERMSET_T permset,
+ SMB_ACL_PERM_T perm);
+char * smb_vfs_call_sys_acl_to_text(struct vfs_handle_struct *handle,
+ SMB_ACL_T theacl, ssize_t *plen);
+SMB_ACL_T smb_vfs_call_sys_acl_init(struct vfs_handle_struct *handle,
+ int count);
+int smb_vfs_call_sys_acl_create_entry(struct vfs_handle_struct *handle,
+ SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
+int smb_vfs_call_sys_acl_set_tag_type(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry,
+ SMB_ACL_TAG_T tagtype);
+int smb_vfs_call_sys_acl_set_qualifier(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry, void *qual);
+int smb_vfs_call_sys_acl_set_permset(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry,
+ SMB_ACL_PERMSET_T permset);
+int smb_vfs_call_sys_acl_valid(struct vfs_handle_struct *handle,
+ SMB_ACL_T theacl);
+int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle,
+ const char *name, SMB_ACL_TYPE_T acltype,
+ SMB_ACL_T theacl);
+int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_ACL_T theacl);
+int smb_vfs_call_sys_acl_delete_def_file(struct vfs_handle_struct *handle,
+ const char *path);
+int smb_vfs_call_sys_acl_get_perm(struct vfs_handle_struct *handle,
+ SMB_ACL_PERMSET_T permset,
+ SMB_ACL_PERM_T perm);
+int smb_vfs_call_sys_acl_free_text(struct vfs_handle_struct *handle,
+ char *text);
+int smb_vfs_call_sys_acl_free_acl(struct vfs_handle_struct *handle,
+ SMB_ACL_T posix_acl);
+int smb_vfs_call_sys_acl_free_qualifier(struct vfs_handle_struct *handle,
+ void *qualifier, SMB_ACL_TAG_T tagtype);
+ssize_t smb_vfs_call_getxattr(struct vfs_handle_struct *handle,
+ const char *path, const char *name, void *value,
+ size_t size);
+ssize_t smb_vfs_call_lgetxattr(struct vfs_handle_struct *handle,
+ const char *path, const char *name, void *value,
+ size_t size);
+ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const char *name,
+ void *value, size_t size);
+ssize_t smb_vfs_call_listxattr(struct vfs_handle_struct *handle,
+ const char *path, char *list, size_t size);
+ssize_t smb_vfs_call_llistxattr(struct vfs_handle_struct *handle,
+ const char *path, char *list, size_t size);
+ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, char *list,
+ size_t size);
+int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
+ const char *path, const char *name);
+int smb_vfs_call_lremovexattr(struct vfs_handle_struct *handle,
+ const char *path, const char *name);
+int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const char *name);
+int smb_vfs_call_setxattr(struct vfs_handle_struct *handle, const char *path,
+ const char *name, const void *value, size_t size,
+ int flags);
+int smb_vfs_call_lsetxattr(struct vfs_handle_struct *handle, const char *path,
+ const char *name, const void *value, size_t size,
+ int flags);
+int smb_vfs_call_fsetxattr(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const char *name,
+ const void *value, size_t size, int flags);
+int smb_vfs_call_aio_read(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+int smb_vfs_call_aio_write(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+ssize_t smb_vfs_call_aio_return_fn(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_STRUCT_AIOCB *aiocb);
+int smb_vfs_call_aio_cancel(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+int smb_vfs_call_aio_error_fn(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_STRUCT_AIOCB *aiocb);
+int smb_vfs_call_aio_fsync(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int op,
+ SMB_STRUCT_AIOCB *aiocb);
+int smb_vfs_call_aio_suspend(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const SMB_STRUCT_AIOCB * const aiocb[], int n,
+ const struct timespec *timeout);
+bool smb_vfs_call_aio_force(struct vfs_handle_struct *handle,
+ struct files_struct *fsp);
+bool smb_vfs_call_is_offline(struct vfs_handle_struct *handle,
+ const char *path, SMB_STRUCT_STAT *sbuf);
+int smb_vfs_call_set_offline(struct vfs_handle_struct *handle,
+ const char *path);
+
#endif /* _VFS_H */
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index b0a0737aacb..b6f4846df07 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -27,403 +27,566 @@
********************************************************************/
/* Disk operations */
-#define SMB_VFS_CONNECT(conn, service, user) ((conn)->vfs.ops.connect_fn((conn)->vfs.handles.connect_hnd, (service), (user)))
-#define SMB_VFS_DISCONNECT(conn) ((conn)->vfs.ops.disconnect((conn)->vfs.handles.disconnect))
-#define SMB_VFS_DISK_FREE(conn, path, small_query, bsize, dfree ,dsize) ((conn)->vfs.ops.disk_free((conn)->vfs.handles.disk_free, (path), (small_query), (bsize), (dfree), (dsize)))
-#define SMB_VFS_GET_QUOTA(conn, qtype, id, qt) ((conn)->vfs.ops.get_quota((conn)->vfs.handles.get_quota, (qtype), (id), (qt)))
-#define SMB_VFS_SET_QUOTA(conn, qtype, id, qt) ((conn)->vfs.ops.set_quota((conn)->vfs.handles.set_quota, (qtype), (id), (qt)))
-#define SMB_VFS_GET_SHADOW_COPY_DATA(fsp,shadow_copy_data,labels) ((fsp)->conn->vfs.ops.get_shadow_copy_data((fsp)->conn->vfs.handles.get_shadow_copy_data,(fsp),(shadow_copy_data),(labels)))
-#define SMB_VFS_STATVFS(conn, path, statbuf) ((conn)->vfs.ops.statvfs((conn)->vfs.handles.statvfs, (path), (statbuf)))
-#define SMB_VFS_FS_CAPABILITIES(conn) ((conn)->vfs.ops.fs_capabilities((conn)->vfs.handles.fs_capabilities))
+#define SMB_VFS_CONNECT(conn, service, user) \
+ smb_vfs_call_connect((conn)->vfs_handles, (service), (user))
+#define SMB_VFS_NEXT_CONNECT(handle, service, user) \
+ smb_vfs_call_connect((handle)->next, (service), (user))
+
+#define SMB_VFS_DISCONNECT(conn) \
+ smb_vfs_call_disconnect((conn)->vfs_handles)
+#define SMB_VFS_NEXT_DISCONNECT(handle) \
+ smb_vfs_call_disconnect((handle)->next)
+
+#define SMB_VFS_DISK_FREE(conn, path, small_query, bsize, dfree ,dsize) \
+ smb_vfs_call_disk_free((conn)->vfs_handles, (path), (small_query), (bsize), (dfree), (dsize))
+#define SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize, dfree ,dsize)\
+ smb_vfs_call_disk_free((handle)->next, (path), (small_query), (bsize), (dfree), (dsize))
+
+#define SMB_VFS_GET_QUOTA(conn, qtype, id, qt) \
+ smb_vfs_call_get_quota((conn)->vfs_handles, (qtype), (id), (qt))
+#define SMB_VFS_NEXT_GET_QUOTA(handle, qtype, id, qt) \
+ smb_vfs_call_get_quota((handle)->next, (qtype), (id), (qt))
+
+#define SMB_VFS_SET_QUOTA(conn, qtype, id, qt) \
+ smb_vfs_call_set_quota((conn)->vfs_handles, (qtype), (id), (qt))
+#define SMB_VFS_NEXT_SET_QUOTA(handle, qtype, id, qt) \
+ smb_vfs_call_set_quota((handle)->next, (qtype), (id), (qt))
+
+#define SMB_VFS_GET_SHADOW_COPY_DATA(fsp,shadow_copy_data,labels) \
+ smb_vfs_call_get_shadow_copy_data((fsp)->conn->vfs_handles, (fsp), (shadow_copy_data), (labels))
+#define SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data ,labels) \
+ smb_vfs_call_get_shadow_copy_data((handle)->next, (fsp), (shadow_copy_data), (labels))
+
+#define SMB_VFS_STATVFS(conn, path, statbuf) \
+ smb_vfs_call_statvfs((conn)->vfs_handles, (path), (statbuf))
+#define SMB_VFS_NEXT_STATVFS(handle, path, statbuf) \
+ smb_vfs_call_statvfs((handle)->next, (path), (statbuf))
+
+#define SMB_VFS_FS_CAPABILITIES(conn) \
+ smb_vfs_call_fs_capabilities((conn)->vfs_handles)
+#define SMB_VFS_NEXT_FS_CAPABILITIES(handle) \
+ smb_vfs_call_fs_capabilities((handle)->next)
/* Directory operations */
-#define SMB_VFS_OPENDIR(conn, fname, mask, attr) ((conn)->vfs.ops.opendir((conn)->vfs.handles.opendir, (fname), (mask), (attr)))
-#define SMB_VFS_READDIR(conn, dirp, sbuf) ((conn)->vfs.ops.readdir((conn)->vfs.handles.readdir, (dirp), (sbuf)))
-#define SMB_VFS_SEEKDIR(conn, dirp, offset) ((conn)->vfs.ops.seekdir((conn)->vfs.handles.seekdir, (dirp), (offset)))
-#define SMB_VFS_TELLDIR(conn, dirp) ((conn)->vfs.ops.telldir((conn)->vfs.handles.telldir, (dirp)))
-#define SMB_VFS_REWINDDIR(conn, dirp) ((conn)->vfs.ops.rewind_dir((conn)->vfs.handles.rewind_dir, (dirp)))
-#define SMB_VFS_MKDIR(conn, path, mode) ((conn)->vfs.ops.mkdir((conn)->vfs.handles.mkdir,(path), (mode)))
-#define SMB_VFS_RMDIR(conn, path) ((conn)->vfs.ops.rmdir((conn)->vfs.handles.rmdir, (path)))
-#define SMB_VFS_CLOSEDIR(conn, dir) ((conn)->vfs.ops.closedir((conn)->vfs.handles.closedir, dir))
-#define SMB_VFS_INIT_SEARCH_OP(conn, dirp) ((conn)->vfs.ops.init_search_op((conn)->vfs.handles.init_search_op, (dirp)))
+#define SMB_VFS_OPENDIR(conn, fname, mask, attr) \
+ smb_vfs_call_opendir((conn)->vfs_handles, (fname), (mask), (attr))
+#define SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr) \
+ smb_vfs_call_opendir((handle)->next, (fname), (mask), (attr))
+
+#define SMB_VFS_READDIR(conn, dirp, sbuf) \
+ smb_vfs_call_readdir((conn)->vfs_handles, (dirp), (sbuf))
+#define SMB_VFS_NEXT_READDIR(handle, dirp, sbuf) \
+ smb_vfs_call_readdir((handle)->next, (dirp), (sbuf))
+
+#define SMB_VFS_SEEKDIR(conn, dirp, offset) \
+ smb_vfs_call_seekdir((conn)->vfs_handles, (dirp), (offset))
+#define SMB_VFS_NEXT_SEEKDIR(handle, dirp, offset) \
+ smb_vfs_call_seekdir((handle)->next, (dirp), (offset))
+
+#define SMB_VFS_TELLDIR(conn, dirp) \
+ smb_vfs_call_telldir((conn)->vfs_handles, (dirp))
+#define SMB_VFS_NEXT_TELLDIR(handle, dirp) \
+ smb_vfs_call_telldir((handle)->next, (dirp))
+
+#define SMB_VFS_REWINDDIR(conn, dirp) \
+ smb_vfs_call_rewind_dir((conn)->vfs_handles, (dirp))
+#define SMB_VFS_NEXT_REWINDDIR(handle, dirp) \
+ smb_vfs_call_rewind_dir((handle)->next, (dirp))
+
+#define SMB_VFS_MKDIR(conn, path, mode) \
+ smb_vfs_call_mkdir((conn)->vfs_handles,(path), (mode))
+#define SMB_VFS_NEXT_MKDIR(handle, path, mode) \
+ smb_vfs_call_mkdir((handle)->next,(path), (mode))
+
+#define SMB_VFS_RMDIR(conn, path) \
+ smb_vfs_call_rmdir((conn)->vfs_handles, (path))
+#define SMB_VFS_NEXT_RMDIR(handle, path) \
+ smb_vfs_call_rmdir((handle)->next, (path))
+
+#define SMB_VFS_CLOSEDIR(conn, dir) \
+ smb_vfs_call_closedir((conn)->vfs_handles, dir)
+#define SMB_VFS_NEXT_CLOSEDIR(handle, dir) \
+ smb_vfs_call_closedir((handle)->next, (dir))
+
+#define SMB_VFS_INIT_SEARCH_OP(conn, dirp) \
+ smb_vfs_call_init_search_op((conn)->vfs_handles, (dirp))
+#define SMB_VFS_NEXT_INIT_SEARCH_OP(handle, dirp) \
+ smb_vfs_call_init_search_op((handle)->next, (dirp))
/* File operations */
-#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs.ops.open)((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode)))
-#define SMB_VFS_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((conn)->vfs.ops.create_file)((conn)->vfs.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo)))
-#define SMB_VFS_CLOSE(fsp) ((fsp)->conn->vfs.ops.close_fn((fsp)->conn->vfs.handles.close_hnd, (fsp)))
-#define SMB_VFS_READ(fsp, data, n) ((fsp)->conn->vfs.ops.vfs_read((fsp)->conn->vfs.handles.vfs_read, (fsp), (data), (n)))
-#define SMB_VFS_PREAD(fsp, data, n, off) ((fsp)->conn->vfs.ops.pread((fsp)->conn->vfs.handles.pread, (fsp), (data), (n), (off)))
-#define SMB_VFS_WRITE(fsp, data, n) ((fsp)->conn->vfs.ops.write((fsp)->conn->vfs.handles.write, (fsp), (data), (n)))
-#define SMB_VFS_PWRITE(fsp, data, n, off) ((fsp)->conn->vfs.ops.pwrite((fsp)->conn->vfs.handles.pwrite, (fsp), (data), (n), (off)))
-#define SMB_VFS_LSEEK(fsp, offset, whence) ((fsp)->conn->vfs.ops.lseek((fsp)->conn->vfs.handles.lseek, (fsp), (offset), (whence)))
-#define SMB_VFS_SENDFILE(tofd, fromfsp, header, offset, count) ((fromfsp)->conn->vfs.ops.sendfile((fromfsp)->conn->vfs.handles.sendfile, (tofd), (fromfsp), (header), (offset), (count)))
-#define SMB_VFS_RECVFILE(fromfd, tofsp, offset, count) ((tofsp)->conn->vfs.ops.recvfile((tofsp)->conn->vfs.handles.recvfile, (fromfd), (tofsp), (offset), (count)))
-#define SMB_VFS_RENAME(conn, old, new) ((conn)->vfs.ops.rename((conn)->vfs.handles.rename, (old), (new)))
-#define SMB_VFS_FSYNC(fsp) ((fsp)->conn->vfs.ops.fsync((fsp)->conn->vfs.handles.fsync, (fsp)))
-#define SMB_VFS_STAT(conn, smb_fname) ((conn)->vfs.ops.stat((conn)->vfs.handles.stat, (smb_fname)))
-#define SMB_VFS_FSTAT(fsp, sbuf) ((fsp)->conn->vfs.ops.fstat((fsp)->conn->vfs.handles.fstat, (fsp), (sbuf)))
-#define SMB_VFS_LSTAT(conn, smb_fname) ((conn)->vfs.ops.lstat((conn)->vfs.handles.lstat, (smb_fname)))
-#define SMB_VFS_GET_ALLOC_SIZE(conn, fsp, sbuf) ((conn)->vfs.ops.get_alloc_size((conn)->vfs.handles.get_alloc_size, (fsp), (sbuf)))
-#define SMB_VFS_UNLINK(conn, path) ((conn)->vfs.ops.unlink((conn)->vfs.handles.unlink, (path)))
-#define SMB_VFS_CHMOD(conn, path, mode) ((conn)->vfs.ops.chmod((conn)->vfs.handles.chmod, (path), (mode)))
-#define SMB_VFS_FCHMOD(fsp, mode) ((fsp)->conn->vfs.ops.fchmod((fsp)->conn->vfs.handles.fchmod, (fsp), (mode)))
-#define SMB_VFS_CHOWN(conn, path, uid, gid) ((conn)->vfs.ops.chown((conn)->vfs.handles.chown, (path), (uid), (gid)))
-#define SMB_VFS_FCHOWN(fsp, uid, gid) ((fsp)->conn->vfs.ops.fchown((fsp)->conn->vfs.handles.fchown, (fsp), (uid), (gid)))
-#define SMB_VFS_LCHOWN(conn, path, uid, gid) ((conn)->vfs.ops.lchown((conn)->vfs.handles.lchown, (path), (uid), (gid)))
-#define SMB_VFS_CHDIR(conn, path) ((conn)->vfs.ops.chdir((conn)->vfs.handles.chdir, (path)))
-#define SMB_VFS_GETWD(conn, buf) ((conn)->vfs.ops.getwd((conn)->vfs.handles.getwd, (buf)))
-#define SMB_VFS_NTIMES(conn, path, ts) ((conn)->vfs.ops.ntimes((conn)->vfs.handles.ntimes, (path), (ts)))
-#define SMB_VFS_FTRUNCATE(fsp, offset) ((fsp)->conn->vfs.ops.ftruncate((fsp)->conn->vfs.handles.ftruncate, (fsp), (offset)))
-#define SMB_VFS_LOCK(fsp, op, offset, count, type) ((fsp)->conn->vfs.ops.lock((fsp)->conn->vfs.handles.lock, (fsp), (op), (offset), (count), (type)))
-#define SMB_VFS_KERNEL_FLOCK(fsp, share_mode) ((fsp)->conn->vfs.ops.kernel_flock((fsp)->conn->vfs.handles.kernel_flock, (fsp), (share_mode)))
-#define SMB_VFS_LINUX_SETLEASE(fsp, leasetype) ((fsp)->conn->vfs.ops.linux_setlease((fsp)->conn->vfs.handles.linux_setlease, (fsp), (leasetype)))
-#define SMB_VFS_GETLOCK(fsp, poffset, pcount, ptype, ppid) ((fsp)->conn->vfs.ops.getlock((fsp)->conn->vfs.handles.getlock, (fsp), (poffset), (pcount), (ptype), (ppid)))
-#define SMB_VFS_SYMLINK(conn, oldpath, newpath) ((conn)->vfs.ops.symlink((conn)->vfs.handles.symlink, (oldpath), (newpath)))
-#define SMB_VFS_READLINK(conn, path, buf, bufsiz) ((conn)->vfs.ops.vfs_readlink((conn)->vfs.handles.vfs_readlink, (path), (buf), (bufsiz)))
-#define SMB_VFS_LINK(conn, oldpath, newpath) ((conn)->vfs.ops.link((conn)->vfs.handles.link, (oldpath), (newpath)))
-#define SMB_VFS_MKNOD(conn, path, mode, dev) ((conn)->vfs.ops.mknod((conn)->vfs.handles.mknod, (path), (mode), (dev)))
-#define SMB_VFS_REALPATH(conn, path, resolved_path) ((conn)->vfs.ops.realpath((conn)->vfs.handles.realpath, (path), (resolved_path)))
-#define SMB_VFS_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) ((conn)->vfs.ops.notify_watch((conn)->vfs.handles.notify_watch, (ctx), (e), (callback), (private_data), (handle_p)))
-#define SMB_VFS_CHFLAGS(conn, path, flags) ((conn)->vfs.ops.chflags((conn)->vfs.handles.chflags, (path), (flags)))
-#define SMB_VFS_FILE_ID_CREATE(conn, sbuf) ((conn)->vfs.ops.file_id_create((conn)->vfs.handles.file_id_create, (sbuf)))
-#define SMB_VFS_STREAMINFO(conn, fsp, fname, mem_ctx, num_streams, streams) ((conn)->vfs.ops.streaminfo((conn)->vfs.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams)))
-#define SMB_VFS_GET_REAL_FILENAME(conn, path, name, mem_ctx, found_name) ((conn)->vfs.ops.get_real_filename((conn)->vfs.handles.get_real_filename, (path), (name), (mem_ctx), (found_name)))
-#define SMB_VFS_CONNECTPATH(conn, fname) ((conn)->vfs.ops.connectpath((conn)->vfs.handles.connectpath, (fname)))
-#define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) ((conn)->vfs.ops.brl_lock_windows((conn)->vfs.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr)))
-#define SMB_VFS_BRL_UNLOCK_WINDOWS(conn, msg_ctx, br_lck, plock) ((conn)->vfs.ops.brl_unlock_windows((conn)->vfs.handles.brl_unlock_windows, (msg_ctx), (br_lck), (plock)))
-#define SMB_VFS_BRL_CANCEL_WINDOWS(conn, br_lck, plock, blr) ((conn)->vfs.ops.brl_cancel_windows((conn)->vfs.handles.brl_cancel_windows, (br_lck), (plock), (blr)))
-#define SMB_VFS_STRICT_LOCK(conn, fsp, plock) ((conn)->vfs.ops.strict_lock((conn)->vfs.handles.strict_lock, (fsp), (plock)))
-#define SMB_VFS_STRICT_UNLOCK(conn, fsp, plock) ((conn)->vfs.ops.strict_unlock((conn)->vfs.handles.strict_unlock, (fsp), (plock)))
-
-/* NT ACL operations. */
-#define SMB_VFS_FGET_NT_ACL(fsp, security_info, ppdesc) ((fsp)->conn->vfs.ops.fget_nt_acl((fsp)->conn->vfs.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
-#define SMB_VFS_GET_NT_ACL(conn, name, security_info, ppdesc) ((conn)->vfs.ops.get_nt_acl((conn)->vfs.handles.get_nt_acl, (name), (security_info), (ppdesc)))
-#define SMB_VFS_FSET_NT_ACL(fsp, security_info_sent, psd) ((fsp)->conn->vfs.ops.fset_nt_acl((fsp)->conn->vfs.handles.fset_nt_acl, (fsp), (security_info_sent), (psd)))
-
-/* POSIX ACL operations. */
-#define SMB_VFS_CHMOD_ACL(conn, name, mode) ((conn)->vfs.ops.chmod_acl((conn)->vfs.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs.ops.fchmod_acl((fsp)->conn->vfs.handles.fchmod_acl, (fsp), (mode)))
-
-#define SMB_VFS_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) ((conn)->vfs.ops.sys_acl_get_entry((conn)->vfs.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
-#define SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) ((conn)->vfs.ops.sys_acl_get_tag_type((conn)->vfs.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
-#define SMB_VFS_SYS_ACL_GET_PERMSET(conn, entry_d, permset_p) ((conn)->vfs.ops.sys_acl_get_permset((conn)->vfs.handles.sys_acl_get_permset, (entry_d), (permset_p)))
-#define SMB_VFS_SYS_ACL_GET_QUALIFIER(conn, entry_d) ((conn)->vfs.ops.sys_acl_get_qualifier((conn)->vfs.handles.sys_acl_get_qualifier, (entry_d)))
-#define SMB_VFS_SYS_ACL_GET_FILE(conn, path_p, type) ((conn)->vfs.ops.sys_acl_get_file((conn)->vfs.handles.sys_acl_get_file, (path_p), (type)))
-#define SMB_VFS_SYS_ACL_GET_FD(fsp) ((fsp)->conn->vfs.ops.sys_acl_get_fd((fsp)->conn->vfs.handles.sys_acl_get_fd, (fsp)))
-#define SMB_VFS_SYS_ACL_CLEAR_PERMS(conn, permset) ((conn)->vfs.ops.sys_acl_clear_perms((conn)->vfs.handles.sys_acl_clear_perms, (permset)))
-#define SMB_VFS_SYS_ACL_ADD_PERM(conn, permset, perm) ((conn)->vfs.ops.sys_acl_add_perm((conn)->vfs.handles.sys_acl_add_perm, (permset), (perm)))
-#define SMB_VFS_SYS_ACL_TO_TEXT(conn, theacl, plen) ((conn)->vfs.ops.sys_acl_to_text((conn)->vfs.handles.sys_acl_to_text, (theacl), (plen)))
-#define SMB_VFS_SYS_ACL_INIT(conn, count) ((conn)->vfs.ops.sys_acl_init((conn)->vfs.handles.sys_acl_init, (count)))
-#define SMB_VFS_SYS_ACL_CREATE_ENTRY(conn, pacl, pentry) ((conn)->vfs.ops.sys_acl_create_entry((conn)->vfs.handles.sys_acl_create_entry, (pacl), (pentry)))
-#define SMB_VFS_SYS_ACL_SET_TAG_TYPE(conn, entry, tagtype) ((conn)->vfs.ops.sys_acl_set_tag_type((conn)->vfs.handles.sys_acl_set_tag_type, (entry), (tagtype)))
-#define SMB_VFS_SYS_ACL_SET_QUALIFIER(conn, entry, qual) ((conn)->vfs.ops.sys_acl_set_qualifier((conn)->vfs.handles.sys_acl_set_qualifier, (entry), (qual)))
-#define SMB_VFS_SYS_ACL_SET_PERMSET(conn, entry, permset) ((conn)->vfs.ops.sys_acl_set_permset((conn)->vfs.handles.sys_acl_set_permset, (entry), (permset)))
-#define SMB_VFS_SYS_ACL_VALID(conn, theacl) ((conn)->vfs.ops.sys_acl_valid((conn)->vfs.handles.sys_acl_valid, (theacl)))
-#define SMB_VFS_SYS_ACL_SET_FILE(conn, name, acltype, theacl) ((conn)->vfs.ops.sys_acl_set_file((conn)->vfs.handles.sys_acl_set_file, (name), (acltype), (theacl)))
-#define SMB_VFS_SYS_ACL_SET_FD(fsp, theacl) ((fsp)->conn->vfs.ops.sys_acl_set_fd((fsp)->conn->vfs.handles.sys_acl_set_fd, (fsp), (theacl)))
-#define SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, path) ((conn)->vfs.ops.sys_acl_delete_def_file((conn)->vfs.handles.sys_acl_delete_def_file, (path)))
-#define SMB_VFS_SYS_ACL_GET_PERM(conn, permset, perm) ((conn)->vfs.ops.sys_acl_get_perm((conn)->vfs.handles.sys_acl_get_perm, (permset), (perm)))
-#define SMB_VFS_SYS_ACL_FREE_TEXT(conn, text) ((conn)->vfs.ops.sys_acl_free_text((conn)->vfs.handles.sys_acl_free_text, (text)))
-#define SMB_VFS_SYS_ACL_FREE_ACL(conn, posix_acl) ((conn)->vfs.ops.sys_acl_free_acl((conn)->vfs.handles.sys_acl_free_acl, (posix_acl)))
-#define SMB_VFS_SYS_ACL_FREE_QUALIFIER(conn, qualifier, tagtype) ((conn)->vfs.ops.sys_acl_free_qualifier((conn)->vfs.handles.sys_acl_free_qualifier, (qualifier), (tagtype)))
-
-/* EA operations. */
-#define SMB_VFS_GETXATTR(conn,path,name,value,size) ((conn)->vfs.ops.getxattr((conn)->vfs.handles.getxattr,(path),(name),(value),(size)))
-#define SMB_VFS_LGETXATTR(conn,path,name,value,size) ((conn)->vfs.ops.lgetxattr((conn)->vfs.handles.lgetxattr,(path),(name),(value),(size)))
-#define SMB_VFS_FGETXATTR(fsp,name,value,size) ((fsp)->conn->vfs.ops.fgetxattr((fsp)->conn->vfs.handles.fgetxattr,(fsp),(name),(value),(size)))
-#define SMB_VFS_LISTXATTR(conn,path,list,size) ((conn)->vfs.ops.listxattr((conn)->vfs.handles.listxattr,(path),(list),(size)))
-#define SMB_VFS_LLISTXATTR(conn,path,list,size) ((conn)->vfs.ops.llistxattr((conn)->vfs.handles.llistxattr,(path),(list),(size)))
-#define SMB_VFS_FLISTXATTR(fsp,list,size) ((fsp)->conn->vfs.ops.flistxattr((fsp)->conn->vfs.handles.flistxattr,(fsp),(list),(size)))
-#define SMB_VFS_REMOVEXATTR(conn,path,name) ((conn)->vfs.ops.removexattr((conn)->vfs.handles.removexattr,(path),(name)))
-#define SMB_VFS_LREMOVEXATTR(conn,path,name) ((conn)->vfs.ops.lremovexattr((conn)->vfs.handles.lremovexattr,(path),(name)))
-#define SMB_VFS_FREMOVEXATTR(fsp,name) ((fsp)->conn->vfs.ops.fremovexattr((fsp)->conn->vfs.handles.fremovexattr,(fsp),(name)))
-#define SMB_VFS_SETXATTR(conn,path,name,value,size,flags) ((conn)->vfs.ops.setxattr((conn)->vfs.handles.setxattr,(path),(name),(value),(size),(flags)))
-#define SMB_VFS_LSETXATTR(conn,path,name,value,size,flags) ((conn)->vfs.ops.lsetxattr((conn)->vfs.handles.lsetxattr,(path),(name),(value),(size),(flags)))
-#define SMB_VFS_FSETXATTR(fsp,name,value,size,flags) ((fsp)->conn->vfs.ops.fsetxattr((fsp)->conn->vfs.handles.fsetxattr,(fsp),(name),(value),(size),(flags)))
-
-/* AIO operations. */
-#define SMB_VFS_AIO_READ(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_read((fsp)->conn->vfs.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_AIO_WRITE(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_write((fsp)->conn->vfs.handles.aio_write,(fsp),(aiocb)))
-#define SMB_VFS_AIO_RETURN(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_return_fn((fsp)->conn->vfs.handles.aio_return,(fsp),(aiocb)))
-#define SMB_VFS_AIO_CANCEL(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_cancel((fsp)->conn->vfs.handles.aio_cancel,(fsp),(aiocb)))
-#define SMB_VFS_AIO_ERROR(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_error_fn((fsp)->conn->vfs.handles.aio_error,(fsp),(aiocb)))
-#define SMB_VFS_AIO_FSYNC(fsp,op,aiocb) ((fsp)->conn->vfs.ops.aio_fsync((fsp)->conn->vfs.handles.aio_fsync,(fsp),(op),(aiocb)))
-#define SMB_VFS_AIO_SUSPEND(fsp,aiocb,n,ts) ((fsp)->conn->vfs.ops.aio_suspend((fsp)->conn->vfs.handles.aio_suspend,(fsp),(aiocb),(n),(ts)))
-#define SMB_VFS_AIO_FORCE(fsp) ((fsp)->conn->vfs.ops.aio_force((fsp)->conn->vfs.handles.aio_force,(fsp)))
-
-/* Offline operations */
-#define SMB_VFS_IS_OFFLINE(conn,path,sbuf) ((conn)->vfs.ops.is_offline((conn)->vfs.handles.is_offline,(path),(sbuf)))
-#define SMB_VFS_SET_OFFLINE(conn,path) ((conn)->vfs.ops.set_offline((conn)->vfs.handles.set_offline,(path)))
-
-/*******************************************************************
- Don't access conn->vfs_opaque.ops directly!!!
- Use this macros!
- (Fixes should also go into the vfs_* and vfs_next_* macros!)
-********************************************************************/
-
-/* Disk operations */
-#define SMB_VFS_OPAQUE_CONNECT(conn, service, user) ((conn)->vfs_opaque.ops.connect_fn((conn)->vfs_opaque.handles.connect_hnd, (service), (user)))
-#define SMB_VFS_OPAQUE_DISCONNECT(conn) ((conn)->vfs_opaque.ops.disconnect((conn)->vfs_opaque.handles.disconnect))
-#define SMB_VFS_OPAQUE_DISK_FREE(conn, path, small_query, bsize, dfree ,dsize) ((conn)->vfs_opaque.ops.disk_free((conn)->vfs_opaque.handles.disk_free, (path), (small_query), (bsize), (dfree), (dsize)))
-#define SMB_VFS_OPAQUE_GET_QUOTA(conn, qtype, id, qt) ((conn)->vfs_opaque.ops.get_quota((conn)->vfs_opaque.handles.get_quota, (qtype), (id), (qt)))
-#define SMB_VFS_OPAQUE_SET_QUOTA(conn, qtype, id, qt) ((conn)->vfs_opaque.ops.set_quota((conn)->vfs_opaque.handles.set_quota, (qtype), (id), (qt)))
-#define SMB_VFS_OPAQUE_GET_SHADOW_COPY_DATA(fsp,shadow_copy_data,labels) ((fsp)->conn->vfs_opaque.ops.get_shadow_copy_data((fsp)->conn->vfs_opaque.handles.get_shadow_copy_data,(fsp),(shadow_copy_data),(labels)))
-#define SMB_VFS_OPAQUE_STATVFS(conn, path, statbuf) ((conn)->vfs_opaque.ops.statvfs((conn)->vfs_opaque.handles.statvfs, (path), (statbuf)))
-#define SMB_VFS_OPAQUE_FS_CAPABILITIES(conn) ((conn)->vfs_opaque.ops.fs_capabilities((conn)->vfs_opaque.handles.fs_capabilities))
-
-/* Directory operations */
-#define SMB_VFS_OPAQUE_OPENDIR(conn, fname, mask, attr) ((conn)->vfs_opaque.ops.opendir((conn)->vfs_opaque.handles.opendir, (fname), (mask), (attr)))
-#define SMB_VFS_OPAQUE_READDIR(conn, dirp, sbuf) ((conn)->vfs_opaque.ops.readdir((conn)->vfs_opaque.handles.readdir, (dirp), (sbuf)))
-#define SMB_VFS_OPAQUE_SEEKDIR(conn, dirp, offset) ((conn)->vfs_opaque.ops.seekdir((conn)->vfs_opaque.handles.seekdir, (dirp), (offset)))
-#define SMB_VFS_OPAQUE_TELLDIR(conn, dirp) ((conn)->vfs_opaque.ops.telldir((conn)->vfs_opaque.handles.telldir, (dirp)))
-#define SMB_VFS_OPAQUE_REWINDDIR(conn, dirp) ((conn)->vfs_opaque.ops.rewind_dir((conn)->vfs_opaque.handles.rewind_dir, (dirp)))
-#define SMB_VFS_OPAQUE_MKDIR(conn, path, mode) ((conn)->vfs_opaque.ops.mkdir((conn)->vfs_opaque.handles.mkdir,(path), (mode)))
-#define SMB_VFS_OPAQUE_RMDIR(conn, path) ((conn)->vfs_opaque.ops.rmdir((conn)->vfs_opaque.handles.rmdir, (path)))
-#define SMB_VFS_OPAQUE_CLOSEDIR(conn, dir) ((conn)->vfs_opaque.ops.closedir((conn)->vfs_opaque.handles.closedir, dir))
-#define SMB_VFS_OPAQUE_INIT_SEARCH_OP(conn, dirp) ((conn)->vfs_opaque.ops.init_search_op((conn)->vfs_opaque.handles.init_search_op, (dirp)))
-
-/* File operations */
-#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs_opaque.ops.open)((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode)))
-#define SMB_VFS_OPAQUE_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((conn)->vfs_opaque.ops.create_file)((conn)->vfs_opaque.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo)))
-#define SMB_VFS_OPAQUE_CLOSE(fsp) ((fsp)->conn->vfs_opaque.ops.close_fn((fsp)->conn->vfs_opaque.handles.close_hnd, (fsp)))
-#define SMB_VFS_OPAQUE_READ(fsp, data, n) ((fsp)->conn->vfs_opaque.ops.vfs_read((fsp)->conn->vfs_opaque.handles.vfs_read, (fsp), (data), (n)))
-#define SMB_VFS_OPAQUE_PREAD(fsp, data, n, off) ((fsp)->conn->vfs_opaque.ops.pread((fsp)->conn->vfs_opaque.handles.pread, (fsp), (data), (n), (off)))
-#define SMB_VFS_OPAQUE_WRITE(fsp, data, n) ((fsp)->conn->vfs_opaque.ops.write((fsp)->conn->vfs_opaque.handles.write, (fsp), (data), (n)))
-#define SMB_VFS_OPAQUE_PWRITE(fsp, data, n, off) ((fsp)->conn->vfs_opaque.ops.pwrite((fsp)->conn->vfs_opaque.handles.pwrite, (fsp), (data), (n), (off)))
-#define SMB_VFS_OPAQUE_LSEEK(fsp, offset, whence) ((fsp)->conn->vfs_opaque.ops.lseek((fsp)->conn->vfs_opaque.handles.lseek, (fsp), (offset), (whence)))
-#define SMB_VFS_OPAQUE_SENDFILE(tofd, fromfsp, header, offset, count) ((fromfsp)->conn->vfs_opaque.ops.sendfile((fromfsp)->conn->vfs_opaque.handles.sendfile, (tofd), (fromfsp), (header), (offset), (count)))
-#define SMB_VFS_OPAQUE_RECVFILE(fromfd, tofsp, offset, count) ((tofsp)->conn->vfs_opaque.ops.recvfile((tofsp)->conn->vfs_opaque.handles.recvfile, (fromfd), (tofsp), (offset), (count)))
-#define SMB_VFS_OPAQUE_RENAME(conn, old, new) ((conn)->vfs_opaque.ops.rename((conn)->vfs_opaque.handles.rename, (old), (new)))
-#define SMB_VFS_OPAQUE_FSYNC(fsp) ((fsp)->conn->vfs_opaque.ops.fsync((fsp)->conn->vfs_opaque.handles.fsync, (fsp)))
-#define SMB_VFS_OPAQUE_STAT(conn, smb_fname) ((conn)->vfs_opaque.ops.stat((conn)->vfs_opaque.handles.stat, (smb_fname)))
-#define SMB_VFS_OPAQUE_FSTAT(fsp, sbuf) ((fsp)->conn->vfs_opaque.ops.fstat((fsp)->conn->vfs_opaque.handles.fstat, (fsp), (sbuf)))
-#define SMB_VFS_OPAQUE_LSTAT(conn, smb_fname) ((conn)->vfs_opaque.ops.lstat((conn)->vfs_opaque.handles.lstat, (smb_fname)))
-#define SMB_VFS_OPAQUE_GET_ALLOC_SIZE(conn, fsp, sbuf) ((conn)->vfs_opaque.ops.get_alloc_size((conn)->vfs_opaque.handles.get_alloc_size, (fsp), (sbuf)))
-#define SMB_VFS_OPAQUE_UNLINK(conn, path) ((conn)->vfs_opaque.ops.unlink((conn)->vfs_opaque.handles.unlink, (path)))
-#define SMB_VFS_OPAQUE_CHMOD(conn, path, mode) ((conn)->vfs_opaque.ops.chmod((conn)->vfs_opaque.handles.chmod, (path), (mode)))
-#define SMB_VFS_OPAQUE_FCHMOD(fsp, mode) ((fsp)->conn->vfs_opaque.ops.fchmod((fsp)->conn->vfs_opaque.handles.fchmod, (fsp), (mode)))
-#define SMB_VFS_OPAQUE_CHOWN(conn, path, uid, gid) ((conn)->vfs_opaque.ops.chown((conn)->vfs_opaque.handles.chown, (path), (uid), (gid)))
-#define SMB_VFS_OPAQUE_FCHOWN(fsp, uid, gid) ((fsp)->conn->vfs_opaque.ops.fchown((fsp)->conn->vfs_opaque.handles.fchown, (fsp), (uid), (gid)))
-#define SMB_VFS_OPAQUE_LCHOWN(conn, path, uid, gid) ((conn)->vfs_opaque.ops.lchown((conn)->vfs_opaque.handles.lchown, (path), (uid), (gid)))
-#define SMB_VFS_OPAQUE_CHDIR(conn, path) ((conn)->vfs_opaque.ops.chdir((conn)->vfs_opaque.handles.chdir, (path)))
-#define SMB_VFS_OPAQUE_GETWD(conn, buf) ((conn)->vfs_opaque.ops.getwd((conn)->vfs_opaque.handles.getwd, (buf)))
-#define SMB_VFS_OPAQUE_NTIMES(conn, path, ts) ((conn)->vfs_opaque.ops.ntimes((conn)->vfs_opaque.handles.ntimes, (path), (ts)))
-#define SMB_VFS_OPAQUE_FTRUNCATE(fsp, offset) ((fsp)->conn->vfs_opaque.ops.ftruncate((fsp)->conn->vfs_opaque.handles.ftruncate, (fsp), (offset)))
-#define SMB_VFS_OPAQUE_LOCK(fsp, op, offset, count, type) ((fsp)->conn->vfs_opaque.ops.lock((fsp)->conn->vfs_opaque.handles.lock, (fsp), (op), (offset), (count), (type)))
-#define SMB_VFS_OPAQUE_KERNEL_FLOCK(fsp, share_mode) ((fsp)->conn->vfs_opaque.ops.kernel_flock((fsp)->conn->vfs_opaque.handles.kernel_flock, (fsp), (share_mode)))
-#define SMB_VFS_OPAQUE_LINUX_SETLEASE(fsp, leasetype) ((fsp)->conn->vfs_opaque.ops.linux_setlease((fsp)->conn->vfs_opaque.handles.linux_setlease, (fsp), (leasetype)))
-#define SMB_VFS_OPAQUE_GETLOCK(fsp, poffset, pcount, ptype, ppid) ((fsp)->conn->vfs_opaque.ops.getlock((fsp)->conn->vfs_opaque.handles.getlock, (fsp), (poffset), (pcount), (ptype), (ppid)))
-#define SMB_VFS_OPAQUE_SYMLINK(conn, oldpath, newpath) ((conn)->vfs_opaque.ops.symlink((conn)->vfs_opaque.handles.symlink, (oldpath), (newpath)))
-#define SMB_VFS_OPAQUE_READLINK(conn, path, buf, bufsiz) ((conn)->vfs_opaque.ops.vfs_readlink((conn)->vfs_opaque.handles.vfs_readlink, (path), (buf), (bufsiz)))
-#define SMB_VFS_OPAQUE_LINK(conn, oldpath, newpath) ((conn)->vfs_opaque.ops.link((conn)->vfs_opaque.handles.link, (oldpath), (newpath)))
-#define SMB_VFS_OPAQUE_MKNOD(conn, path, mode, dev) ((conn)->vfs_opaque.ops.mknod((conn)->vfs_opaque.handles.mknod, (path), (mode), (dev)))
-#define SMB_VFS_OPAQUE_REALPATH(conn, path, resolved_path) ((conn)->vfs_opaque.ops.realpath((conn)->vfs_opaque.handles.realpath, (path), (resolved_path)))
-#define SMB_VFS_OPAQUE_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) ((conn)->vfs_opaque.ops.notify_watch((conn)->vfs_opaque.handles.notify_watch, (ctx), (e), (callback), (private_data), (handle_p)))
-#define SMB_VFS_OPAQUE_CHFLAGS(conn, path, flags) ((conn)->vfs_opaque.ops.chflags((conn)->vfs_opaque.handles.chflags, (path), (flags)))
-#define SMB_VFS_OPAQUE_FILE_ID_CREATE(conn, sbuf) ((conn)->vfs.ops_opaque.file_id_create((conn)->vfs_opaque.handles.file_id_create, (sbuf)))
-#define SMB_VFS_OPAQUE_STREAMINFO(conn, fsp, fname, mem_ctx, num_streams, streams) ((conn)->vfs_opaque.ops.streaminfo((conn)->vfs_opaque.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams)))
-#define SMB_VFS_OPAQUE_GET_REAL_FILENAME(conn, path, name, mem_ctx, found_name) ((conn)->vfs_opaque.ops.get_real_filename((conn)->vfs_opaque.handles.get_real_filename, (path), (name), (mem_ctx), (found_name)))
-#define SMB_VFS_OPAQUE_CONNECTPATH(conn, fname) ((conn)->vfs_opaque.ops.connectpath((conn)->vfs_opaque.handles.connectpath, (fname)))
-#define SMB_VFS_OPAQUE_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) ((conn)->vfs_opaque.ops.brl_lock_windows((conn)->vfs_opaque.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr)))
-#define SMB_VFS_OPAQUE_BRL_UNLOCK_WINDOWS(conn, msg_ctx, br_lck, plock) ((conn)->vfs_opaque.ops.brl_unlock_windows((conn)->vfs_opaque.handles.brl_unlock_windows, (msg_ctx), (br_lck), (plock)))
-#define SMB_VFS_OPAQUE_BRL_CANCEL_WINDOWS(conn, br_lck, plock, blr) ((conn)->vfs_opaque.ops.brl_cancel_windows((conn)->vfs_opaque.handles.brl_cancel_windows, (br_lck), (plock), (blr)))
-#define SMB_VFS_OPAQUE_STRICT_LOCK(conn, fsp, plock) ((conn)->vfs_opaque.ops.strict_lock((conn)->vfs_opaque.handles.strict_lock, (fsp), (plock)))
-#define SMB_VFS_OPAQUE_STRICT_UNLOCK(conn, fsp, plock) ((conn)->vfs_opaque.ops.strict_unlock((conn)->vfs_opaque.handles.strict_unlock, (fsp), (plock)))
-
-/* NT ACL operations. */
-#define SMB_VFS_OPAQUE_FGET_NT_ACL(fsp, security_info, ppdesc) ((fsp)->conn->vfs_opaque.ops.fget_nt_acl((fsp)->conn->vfs_opaque.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
-#define SMB_VFS_OPAQUE_GET_NT_ACL(conn, name, security_info, ppdesc) ((conn)->vfs_opaque.ops.get_nt_acl((conn)->vfs_opaque.handles.get_nt_acl, (name), (security_info), (ppdesc)))
-#define SMB_VFS_OPAQUE_FSET_NT_ACL(fsp, security_info_sent, psd) ((fsp)->conn->vfs_opaque.ops.fset_nt_acl((fsp)->conn->vfs_opaque.handles.fset_nt_acl, (fsp), (security_info_sent), (psd)))
-
-/* POSIX ACL operations. */
-#define SMB_VFS_OPAQUE_CHMOD_ACL(conn, name, mode) ((conn)->vfs_opaque.ops.chmod_acl((conn)->vfs_opaque.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_OPAQUE_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs_opaque.ops.fchmod_acl((fsp)->conn->vfs_opaque.handles.fchmod_acl, (fsp), (mode)))
-
-#define SMB_VFS_OPAQUE_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) ((conn)->vfs_opaque.ops.sys_acl_get_entry((conn)->vfs_opaque.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
-#define SMB_VFS_OPAQUE_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) ((conn)->vfs_opaque.ops.sys_acl_get_tag_type((conn)->vfs_opaque.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
-#define SMB_VFS_OPAQUE_SYS_ACL_GET_PERMSET(conn, entry_d, permset_p) ((conn)->vfs_opaque.ops.sys_acl_get_permset((conn)->vfs_opaque.handles.sys_acl_get_permset, (entry_d), (permset_p)))
-#define SMB_VFS_OPAQUE_SYS_ACL_GET_QUALIFIER(conn, entry_d) ((conn)->vfs_opaque.ops.sys_acl_get_qualifier((conn)->vfs_opaque.handles.sys_acl_get_qualifier, (entry_d)))
-#define SMB_VFS_OPAQUE_SYS_ACL_GET_FILE(conn, path_p, type) ((conn)->vfs_opaque.ops.sys_acl_get_file((conn)->vfs_opaque.handles.sys_acl_get_file, (path_p), (type)))
-#define SMB_VFS_OPAQUE_SYS_ACL_GET_FD(fsp) ((fsp)->conn->vfs_opaque.ops.sys_acl_get_fd((fsp)->conn->vfs_opaque.handles.sys_acl_get_fd, (fsp)))
-#define SMB_VFS_OPAQUE_SYS_ACL_CLEAR_PERMS(conn, permset) ((conn)->vfs_opaque.ops.sys_acl_clear_perms((conn)->vfs_opaque.handles.sys_acl_clear_perms, (permset)))
-#define SMB_VFS_OPAQUE_SYS_ACL_ADD_PERM(conn, permset, perm) ((conn)->vfs_opaque.ops.sys_acl_add_perm((conn)->vfs_opaque.handles.sys_acl_add_perm, (permset), (perm)))
-#define SMB_VFS_OPAQUE_SYS_ACL_TO_TEXT(conn, theacl, plen) ((conn)->vfs_opaque.ops.sys_acl_to_text((conn)->vfs_opaque.handles.sys_acl_to_text, (theacl), (plen)))
-#define SMB_VFS_OPAQUE_SYS_ACL_INIT(conn, count) ((conn)->vfs_opaque.ops.sys_acl_init((conn)->vfs_opaque.handles.sys_acl_init, (count)))
-#define SMB_VFS_OPAQUE_SYS_ACL_CREATE_ENTRY(conn, pacl, pentry) ((conn)->vfs_opaque.ops.sys_acl_create_entry((conn)->vfs_opaque.handles.sys_acl_create_entry, (pacl), (pentry)))
-#define SMB_VFS_OPAQUE_SYS_ACL_SET_TAG_TYPE(conn, entry, tagtype) ((conn)->vfs_opaque.ops.sys_acl_set_tag_type((conn)->vfs_opaque.handles.sys_acl_set_tag_type, (entry), (tagtype)))
-#define SMB_VFS_OPAQUE_SYS_ACL_SET_QUALIFIER(conn, entry, qual) ((conn)->vfs_opaque.ops.sys_acl_set_qualifier((conn)->vfs_opaque.handles.sys_acl_set_qualifier, (entry), (qual)))
-#define SMB_VFS_OPAQUE_SYS_ACL_SET_PERMSET(conn, entry, permset) ((conn)->vfs_opaque.ops.sys_acl_set_permset((conn)->vfs_opaque.handles.sys_acl_set_permset, (entry), (permset)))
-#define SMB_VFS_OPAQUE_SYS_ACL_VALID(conn, theacl) ((conn)->vfs_opaque.ops.sys_acl_valid((conn)->vfs_opaque.handles.sys_acl_valid, (theacl)))
-#define SMB_VFS_OPAQUE_SYS_ACL_SET_FILE(conn, name, acltype, theacl) ((conn)->vfs_opaque.ops.sys_acl_set_file((conn)->vfs_opaque.handles.sys_acl_set_file, (name), (acltype), (theacl)))
-#define SMB_VFS_OPAQUE_SYS_ACL_SET_FD(fsp, theacl) ((fsp)->conn->vfs_opaque.ops.sys_acl_set_fd((fsp)->conn->vfs_opaque.handles.sys_acl_set_fd, (fsp), (theacl)))
-#define SMB_VFS_OPAQUE_SYS_ACL_DELETE_DEF_FILE(conn, path) ((conn)->vfs_opaque.ops.sys_acl_delete_def_file((conn)->vfs_opaque.handles.sys_acl_delete_def_file, (path)))
-#define SMB_VFS_OPAQUE_SYS_ACL_GET_PERM(conn, permset, perm) ((conn)->vfs_opaque.ops.sys_acl_get_perm((conn)->vfs_opaque.handles.sys_acl_get_perm, (permset), (perm)))
-#define SMB_VFS_OPAQUE_SYS_ACL_FREE_TEXT(conn, text) ((conn)->vfs_opaque.ops.sys_acl_free_text((conn)->vfs_opaque.handles.sys_acl_free_text, (text)))
-#define SMB_VFS_OPAQUE_SYS_ACL_FREE_ACL(conn, posix_acl) ((conn)->vfs_opaque.ops.sys_acl_free_acl((conn)->vfs_opaque.handles.sys_acl_free_acl, (posix_acl)))
-#define SMB_VFS_OPAQUE_SYS_ACL_FREE_QUALIFIER(conn, qualifier, tagtype) ((conn)->vfs_opaque.ops.sys_acl_free_qualifier((conn)->vfs_opaque.handles.sys_acl_free_qualifier, (qualifier), (tagtype)))
-
-/* EA operations. */
-#define SMB_VFS_OPAQUE_GETXATTR(conn,path,name,value,size) ((conn)->vfs_opaque.ops.getxattr((conn)->vfs_opaque.handles.getxattr,(path),(name),(value),(size)))
-#define SMB_VFS_OPAQUE_LGETXATTR(conn,path,name,value,size) ((conn)->vfs_opaque.ops.lgetxattr((conn)->vfs_opaque.handles.lgetxattr,(path),(name),(value),(size)))
-#define SMB_VFS_OPAQUE_FGETXATTR(fsp,name,value,size) ((fsp)->conn->vfs_opaque.ops.fgetxattr((fsp)->conn->vfs_opaque.handles.fgetxattr,(fsp),(name),(value),(size)))
-#define SMB_VFS_OPAQUE_LISTXATTR(conn,path,list,size) ((conn)->vfs_opaque.ops.listxattr((conn)->vfs_opaque.handles.listxattr,(path),(list),(size)))
-#define SMB_VFS_OPAQUE_LLISTXATTR(conn,path,list,size) ((conn)->vfs_opaque.ops.llistxattr((conn)->vfs_opaque.handles.llistxattr,(path),(list),(size)))
-#define SMB_VFS_OPAQUE_FLISTXATTR(fsp,list,size) ((fsp)->conn->vfs_opaque.ops.flistxattr((fsp)->conn->vfs_opaque.handles.flistxattr,(fsp),(list),(size)))
-#define SMB_VFS_OPAQUE_REMOVEXATTR(conn,path,name) ((conn)->vfs_opaque.ops.removexattr((conn)->vfs_opaque.handles.removexattr,(path),(name)))
-#define SMB_VFS_OPAQUE_LREMOVEXATTR(conn,path,name) ((conn)->vfs_opaque.ops.lremovexattr((conn)->vfs_opaque.handles.lremovexattr,(path),(name)))
-#define SMB_VFS_OPAQUE_FREMOVEXATTR(fsp,name) ((fsp)->conn->vfs_opaque.ops.fremovexattr((fsp)->conn->vfs_opaque.handles.fremovexattr,(fsp),(name)))
-#define SMB_VFS_OPAQUE_SETXATTR(conn,path,name,value,size,flags) ((conn)->vfs_opaque.ops.setxattr((conn)->vfs_opaque.handles.setxattr,(path),(name),(value),(size),(flags)))
-#define SMB_VFS_OPAQUE_LSETXATTR(conn,path,name,value,size,flags) ((conn)->vfs_opaque.ops.lsetxattr((conn)->vfs_opaque.handles.lsetxattr,(path),(name),(value),(size),(flags)))
-#define SMB_VFS_OPAQUE_FSETXATTR(fsp,name,value,size,flags) ((fsp)->conn->vfs_opaque.ops.fsetxattr((fsp)->conn->vfs_opaque.handles.fsetxattr,(fsp),(name),(value),(size),(flags)))
-
-/* AIO operations. */
-#define SMB_VFS_OPAQUE_AIO_READ(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_read((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_WRITE(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_write((fsp)->conn->vfs_opaque.handles.aio_write,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_RETURN(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_return_fn((fsp)->conn->vfs_opaque.handles.aio_return,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_CANCEL(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_cancel((fsp)->conn->vfs_opaque.handles.cancel,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_ERROR(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_error_fn((fsp)->conn->vfs_opaque.handles.aio_error,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_FSYNC(fsp,op,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_fsync((fsp)->conn->vfs_opaque.handles.aio_fsync,(fsp),(op),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_SUSPEND(fsp,aiocb,n,ts) ((fsp)->conn->vfs_opaque.ops.aio_suspend((fsp)->conn->vfs_opaque.handles.aio_suspend,(fsp),(aiocb),(n),(ts)))
-#define SMB_VFS_OPAQUE_AIO_FORCE(fsp) ((fsp)->conn->vfs_opaque.ops.aio_force((fsp)->conn->vfs_opaque.handles.aio_force,(fsp)))
-
-/* Offline operations */
-#define SMB_VFS_OPAQUE_IS_OFFLINE(conn,path,sbuf) ((conn)->vfs_opaque.ops.is_offline((conn)->vfs_opaque.handles.is_offline,(path),(sbuf)))
-#define SMB_VFS_OPAQUE_SET_OFFLINE(conn,path) ((conn)->vfs_opaque.ops.set_offline((conn)->vfs_opaque.handles.set_offline,(path)))
-
-/*******************************************************************
- Don't access handle->vfs_next.ops.* directly!!!
- Use this macros!
- (Fixes should go also into the vfs_* and vfs_opaque_* macros!)
-********************************************************************/
-
-/* Disk operations */
-#define SMB_VFS_NEXT_CONNECT(handle, service, user) ((handle)->vfs_next.ops.connect_fn((handle)->vfs_next.handles.connect_hnd, (service), (user)))
-#define SMB_VFS_NEXT_DISCONNECT(handle) ((handle)->vfs_next.ops.disconnect((handle)->vfs_next.handles.disconnect))
-#define SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize, dfree ,dsize) ((handle)->vfs_next.ops.disk_free((handle)->vfs_next.handles.disk_free, (path), (small_query), (bsize), (dfree), (dsize)))
-#define SMB_VFS_NEXT_GET_QUOTA(handle, qtype, id, qt) ((handle)->vfs_next.ops.get_quota((handle)->vfs_next.handles.get_quota, (qtype), (id), (qt)))
-#define SMB_VFS_NEXT_SET_QUOTA(handle, qtype, id, qt) ((handle)->vfs_next.ops.set_quota((handle)->vfs_next.handles.set_quota, (qtype), (id), (qt)))
-#define SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data ,labels) ((handle)->vfs_next.ops.get_shadow_copy_data((handle)->vfs_next.handles.get_shadow_copy_data,(fsp),(shadow_copy_data),(labels)))
-#define SMB_VFS_NEXT_STATVFS(handle, path, statbuf) ((handle)->vfs_next.ops.statvfs((handle)->vfs_next.handles.statvfs, (path), (statbuf)))
-#define SMB_VFS_NEXT_FS_CAPABILITIES(handle) ((handle)->vfs_next.ops.fs_capabilities((handle)->vfs_next.handles.fs_capabilities))
-
-/* Directory operations */
-#define SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr) ((handle)->vfs_next.ops.opendir((handle)->vfs_next.handles.opendir, (fname), (mask), (attr)))
-#define SMB_VFS_NEXT_READDIR(handle, dirp, sbuf) ((handle)->vfs_next.ops.readdir((handle)->vfs_next.handles.readdir, (dirp), (sbuf)))
-#define SMB_VFS_NEXT_SEEKDIR(handle, dirp, offset) ((handle)->vfs_next.ops.seekdir((handle)->vfs_next.handles.seekdir, (dirp), (offset)))
-#define SMB_VFS_NEXT_TELLDIR(handle, dirp) ((handle)->vfs_next.ops.telldir((handle)->vfs_next.handles.telldir, (dirp)))
-#define SMB_VFS_NEXT_REWINDDIR(handle, dirp) ((handle)->vfs_next.ops.rewind_dir((handle)->vfs_next.handles.rewind_dir, (dirp)))
-#define SMB_VFS_NEXT_DIR(handle, dirp, sbuf) ((handle)->vfs_next.ops.readdir((handle)->vfs_next.handles.readdir, (dirp), (sbuf)))
-#define SMB_VFS_NEXT_MKDIR(handle, path, mode) ((handle)->vfs_next.ops.mkdir((handle)->vfs_next.handles.mkdir,(path), (mode)))
-#define SMB_VFS_NEXT_RMDIR(handle, path) ((handle)->vfs_next.ops.rmdir((handle)->vfs_next.handles.rmdir, (path)))
-#define SMB_VFS_NEXT_CLOSEDIR(handle, dir) ((handle)->vfs_next.ops.closedir((handle)->vfs_next.handles.closedir, dir))
-#define SMB_VFS_NEXT_INIT_SEARCH_OP(handle, dirp) ((handle)->vfs_next.ops.init_search_op((handle)->vfs_next.handles.init_search_op, (dirp)))
-
-/* File operations */
-#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) (((handle)->vfs_next.ops.open)((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode)))
-#define SMB_VFS_NEXT_CREATE_FILE(handle, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((handle)->vfs_next.ops.create_file)((handle)->vfs_next.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo)))
-#define SMB_VFS_NEXT_CLOSE(handle, fsp) ((handle)->vfs_next.ops.close_fn((handle)->vfs_next.handles.close_hnd, (fsp)))
-#define SMB_VFS_NEXT_READ(handle, fsp, data, n) ((handle)->vfs_next.ops.vfs_read((handle)->vfs_next.handles.vfs_read, (fsp), (data), (n)))
-#define SMB_VFS_NEXT_PREAD(handle, fsp, data, n, off) ((handle)->vfs_next.ops.pread((handle)->vfs_next.handles.pread, (fsp), (data), (n), (off)))
-#define SMB_VFS_NEXT_WRITE(handle, fsp, data, n) ((handle)->vfs_next.ops.write((handle)->vfs_next.handles.write, (fsp), (data), (n)))
-#define SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, off) ((handle)->vfs_next.ops.pwrite((handle)->vfs_next.handles.pwrite, (fsp), (data), (n), (off)))
-#define SMB_VFS_NEXT_LSEEK(handle, fsp, offset, whence) ((handle)->vfs_next.ops.lseek((handle)->vfs_next.handles.lseek, (fsp), (offset), (whence)))
-#define SMB_VFS_NEXT_SENDFILE(handle, tofd, fromfsp, header, offset, count) ((handle)->vfs_next.ops.sendfile((handle)->vfs_next.handles.sendfile, (tofd), (fromfsp), (header), (offset), (count)))
-#define SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, count) ((handle)->vfs_next.ops.recvfile((handle)->vfs_next.handles.recvfile, (fromfd), (tofsp), (offset), (count)))
-#define SMB_VFS_NEXT_RENAME(handle, old, new) ((handle)->vfs_next.ops.rename((handle)->vfs_next.handles.rename, (old), (new)))
-#define SMB_VFS_NEXT_FSYNC(handle, fsp) ((handle)->vfs_next.ops.fsync((handle)->vfs_next.handles.fsync, (fsp)))
-#define SMB_VFS_NEXT_STAT(handle, smb_fname) ((handle)->vfs_next.ops.stat((handle)->vfs_next.handles.stat, (smb_fname)))
-#define SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf) ((handle)->vfs_next.ops.fstat((handle)->vfs_next.handles.fstat, (fsp), (sbuf)))
-#define SMB_VFS_NEXT_LSTAT(handle, smb_fname) ((handle)->vfs_next.ops.lstat((handle)->vfs_next.handles.lstat, (smb_fname)))
-#define SMB_VFS_NEXT_GET_ALLOC_SIZE(conn, fsp, sbuf) ((conn)->vfs_next.ops.get_alloc_size((conn)->vfs_next.handles.get_alloc_size, (fsp), (sbuf)))
-#define SMB_VFS_NEXT_UNLINK(handle, path) ((handle)->vfs_next.ops.unlink((handle)->vfs_next.handles.unlink, (path)))
-#define SMB_VFS_NEXT_CHMOD(handle, path, mode) ((handle)->vfs_next.ops.chmod((handle)->vfs_next.handles.chmod, (path), (mode)))
-#define SMB_VFS_NEXT_FCHMOD(handle, fsp, mode) ((handle)->vfs_next.ops.fchmod((handle)->vfs_next.handles.fchmod, (fsp), (mode)))
-#define SMB_VFS_NEXT_CHOWN(handle, path, uid, gid) ((handle)->vfs_next.ops.chown((handle)->vfs_next.handles.chown, (path), (uid), (gid)))
-#define SMB_VFS_NEXT_FCHOWN(handle, fsp, uid, gid) ((handle)->vfs_next.ops.fchown((handle)->vfs_next.handles.fchown, (fsp), (uid), (gid)))
-#define SMB_VFS_NEXT_LCHOWN(handle, path, uid, gid) ((handle)->vfs_next.ops.lchown((handle)->vfs_next.handles.lchown, (path), (uid), (gid)))
-#define SMB_VFS_NEXT_CHDIR(handle, path) ((handle)->vfs_next.ops.chdir((handle)->vfs_next.handles.chdir, (path)))
-#define SMB_VFS_NEXT_GETWD(handle, buf) ((handle)->vfs_next.ops.getwd((handle)->vfs_next.handles.getwd, (buf)))
-#define SMB_VFS_NEXT_NTIMES(handle, path, ts) ((handle)->vfs_next.ops.ntimes((handle)->vfs_next.handles.ntimes, (path), (ts)))
-#define SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset) ((handle)->vfs_next.ops.ftruncate((handle)->vfs_next.handles.ftruncate, (fsp), (offset)))
-#define SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type) ((handle)->vfs_next.ops.lock((handle)->vfs_next.handles.lock, (fsp), (op), (offset), (count), (type)))
-#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode)((handle)->vfs_next.ops.kernel_flock((handle)->vfs_next.handles.kernel_flock, (fsp), (share_mode)))
-#define SMB_VFS_NEXT_LINUX_SETLEASE(handle, fsp, leasetype)((handle)->vfs_next.ops.linux_setlease((handle)->vfs_next.handles.linux_setlease, (fsp), (leasetype)))
-#define SMB_VFS_NEXT_GETLOCK(handle, fsp, poffset, pcount, ptype, ppid) ((handle)->vfs_next.ops.getlock((handle)->vfs_next.handles.getlock, (fsp), (poffset), (pcount), (ptype), (ppid)))
-#define SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath) ((handle)->vfs_next.ops.symlink((handle)->vfs_next.handles.symlink, (oldpath), (newpath)))
-#define SMB_VFS_NEXT_READLINK(handle, path, buf, bufsiz) ((handle)->vfs_next.ops.vfs_readlink((handle)->vfs_next.handles.vfs_readlink, (path), (buf), (bufsiz)))
-#define SMB_VFS_NEXT_LINK(handle, oldpath, newpath) ((handle)->vfs_next.ops.link((handle)->vfs_next.handles.link, (oldpath), (newpath)))
-#define SMB_VFS_NEXT_MKNOD(handle, path, mode, dev) ((handle)->vfs_next.ops.mknod((handle)->vfs_next.handles.mknod, (path), (mode), (dev)))
-#define SMB_VFS_NEXT_REALPATH(handle, path, resolved_path) ((handle)->vfs_next.ops.realpath((handle)->vfs_next.handles.realpath, (path), (resolved_path)))
-#define SMB_VFS_NEXT_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) ((conn)->vfs_next.ops.notify_watch((conn)->vfs_next.handles.notify_watch, (ctx), (e), (callback), (private_data), (handle_p)))
-#define SMB_VFS_NEXT_CHFLAGS(handle, path, flags) ((handle)->vfs_next.ops.chflags((handle)->vfs_next.handles.chflags, (path), (flags)))
-#define SMB_VFS_NEXT_FILE_ID_CREATE(handle, sbuf) ((handle)->vfs_next.ops.file_id_create((handle)->vfs_next.handles.file_id_create, (sbuf)))
-#define SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, num_streams, streams) ((handle)->vfs_next.ops.streaminfo((handle)->vfs_next.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams)))
-#define SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name, mem_ctx, found_name) ((handle)->vfs_next.ops.get_real_filename((handle)->vfs_next.handles.get_real_filename, (path), (name), (mem_ctx), (found_name)))
-#define SMB_VFS_NEXT_CONNECTPATH(conn, fname) ((conn)->vfs_next.ops.connectpath((conn)->vfs_next.handles.connectpath, (fname)))
-#define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock, blocking_lock, blr) ((handle)->vfs_next.ops.brl_lock_windows((handle)->vfs_next.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr)))
-#define SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock) ((handle)->vfs_next.ops.brl_unlock_windows((handle)->vfs_next.handles.brl_unlock_windows, (msg_ctx), (br_lck), (plock)))
-#define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock, blr) ((handle)->vfs_next.ops.brl_cancel_windows((handle)->vfs_next.handles.brl_cancel_windows, (br_lck), (plock), (blr)))
-#define SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock) ((handle)->vfs_next.ops.strict_lock((handle)->vfs_next.handles.strict_lock, (fsp), (plock)))
-#define SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock) ((handle)->vfs_next.ops.strict_unlock((handle)->vfs_next.handles.strict_unlock, (fsp), (plock)))
-
-/* NT ACL operations. */
-#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc) ((handle)->vfs_next.ops.fget_nt_acl((handle)->vfs_next.handles.fget_nt_acl, (fsp), (security_info), (ppdesc)))
-#define SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, ppdesc) ((handle)->vfs_next.ops.get_nt_acl((handle)->vfs_next.handles.get_nt_acl, (name), (security_info), (ppdesc)))
-#define SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd) ((handle)->vfs_next.ops.fset_nt_acl((handle)->vfs_next.handles.fset_nt_acl, (fsp), (security_info_sent), (psd)))
-
-/* POSIX ACL operations. */
-#define SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode) ((handle)->vfs_next.ops.chmod_acl((handle)->vfs_next.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) ((handle)->vfs_next.ops.fchmod_acl((handle)->vfs_next.handles.fchmod_acl, (fsp), (mode)))
-
-#define SMB_VFS_NEXT_SYS_ACL_GET_ENTRY(handle, theacl, entry_id, entry_p) ((handle)->vfs_next.ops.sys_acl_get_entry((handle)->vfs_next.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
-#define SMB_VFS_NEXT_SYS_ACL_GET_TAG_TYPE(handle, entry_d, tag_type_p) ((handle)->vfs_next.ops.sys_acl_get_tag_type((handle)->vfs_next.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
-#define SMB_VFS_NEXT_SYS_ACL_GET_PERMSET(handle, entry_d, permset_p) ((handle)->vfs_next.ops.sys_acl_get_permset((handle)->vfs_next.handles.sys_acl_get_permset, (entry_d), (permset_p)))
-#define SMB_VFS_NEXT_SYS_ACL_GET_QUALIFIER(handle, entry_d) ((handle)->vfs_next.ops.sys_acl_get_qualifier((handle)->vfs_next.handles.sys_acl_get_qualifier, (entry_d)))
-#define SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, path_p, type) ((handle)->vfs_next.ops.sys_acl_get_file((handle)->vfs_next.handles.sys_acl_get_file, (path_p), (type)))
-#define SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp) ((handle)->vfs_next.ops.sys_acl_get_fd((handle)->vfs_next.handles.sys_acl_get_fd, (fsp)))
-#define SMB_VFS_NEXT_SYS_ACL_CLEAR_PERMS(handle, permset) ((handle)->vfs_next.ops.sys_acl_clear_perms((handle)->vfs_next.handles.sys_acl_clear_perms, (permset)))
-#define SMB_VFS_NEXT_SYS_ACL_ADD_PERM(handle, permset, perm) ((handle)->vfs_next.ops.sys_acl_add_perm((handle)->vfs_next.handles.sys_acl_add_perm, (permset), (perm)))
-#define SMB_VFS_NEXT_SYS_ACL_TO_TEXT(handle, theacl, plen) ((handle)->vfs_next.ops.sys_acl_to_text((handle)->vfs_next.handles.sys_acl_to_text, (theacl), (plen)))
-#define SMB_VFS_NEXT_SYS_ACL_INIT(handle, count) ((handle)->vfs_next.ops.sys_acl_init((handle)->vfs_next.handles.sys_acl_init, (count)))
-#define SMB_VFS_NEXT_SYS_ACL_CREATE_ENTRY(handle, pacl, pentry) ((handle)->vfs_next.ops.sys_acl_create_entry((handle)->vfs_next.handles.sys_acl_create_entry, (pacl), (pentry)))
-#define SMB_VFS_NEXT_SYS_ACL_SET_TAG_TYPE(handle, entry, tagtype) ((handle)->vfs_next.ops.sys_acl_set_tag_type((handle)->vfs_next.handles.sys_acl_set_tag_type, (entry), (tagtype)))
-#define SMB_VFS_NEXT_SYS_ACL_SET_QUALIFIER(handle, entry, qual) ((handle)->vfs_next.ops.sys_acl_set_qualifier((handle)->vfs_next.handles.sys_acl_set_qualifier, (entry), (qual)))
-#define SMB_VFS_NEXT_SYS_ACL_SET_PERMSET(handle, entry, permset) ((handle)->vfs_next.ops.sys_acl_set_permset((handle)->vfs_next.handles.sys_acl_set_permset, (entry), (permset)))
-#define SMB_VFS_NEXT_SYS_ACL_VALID(handle, theacl) ((handle)->vfs_next.ops.sys_acl_valid((handle)->vfs_next.handles.sys_acl_valid, (theacl)))
-#define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, name, acltype, theacl) ((handle)->vfs_next.ops.sys_acl_set_file((handle)->vfs_next.handles.sys_acl_set_file, (name), (acltype), (theacl)))
-#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl) ((handle)->vfs_next.ops.sys_acl_set_fd((handle)->vfs_next.handles.sys_acl_set_fd, (fsp), (theacl)))
-#define SMB_VFS_NEXT_SYS_ACL_DELETE_DEF_FILE(handle, path) ((handle)->vfs_next.ops.sys_acl_delete_def_file((handle)->vfs_next.handles.sys_acl_delete_def_file, (path)))
-#define SMB_VFS_NEXT_SYS_ACL_GET_PERM(handle, permset, perm) ((handle)->vfs_next.ops.sys_acl_get_perm((handle)->vfs_next.handles.sys_acl_get_perm, (permset), (perm)))
-#define SMB_VFS_NEXT_SYS_ACL_FREE_TEXT(handle, text) ((handle)->vfs_next.ops.sys_acl_free_text((handle)->vfs_next.handles.sys_acl_free_text, (text)))
-#define SMB_VFS_NEXT_SYS_ACL_FREE_ACL(handle, posix_acl) ((handle)->vfs_next.ops.sys_acl_free_acl((handle)->vfs_next.handles.sys_acl_free_acl, (posix_acl)))
-#define SMB_VFS_NEXT_SYS_ACL_FREE_QUALIFIER(handle, qualifier, tagtype) ((handle)->vfs_next.ops.sys_acl_free_qualifier((handle)->vfs_next.handles.sys_acl_free_qualifier, (qualifier), (tagtype)))
-
-/* EA operations. */
-#define SMB_VFS_NEXT_GETXATTR(handle,path,name,value,size) ((handle)->vfs_next.ops.getxattr((handle)->vfs_next.handles.getxattr,(path),(name),(value),(size)))
-#define SMB_VFS_NEXT_LGETXATTR(handle,path,name,value,size) ((handle)->vfs_next.ops.lgetxattr((handle)->vfs_next.handles.lgetxattr,(path),(name),(value),(size)))
-#define SMB_VFS_NEXT_FGETXATTR(handle,fsp,name,value,size) ((handle)->vfs_next.ops.fgetxattr((handle)->vfs_next.handles.fgetxattr,(fsp),(name),(value),(size)))
-#define SMB_VFS_NEXT_LISTXATTR(handle,path,list,size) ((handle)->vfs_next.ops.listxattr((handle)->vfs_next.handles.listxattr,(path),(list),(size)))
-#define SMB_VFS_NEXT_LLISTXATTR(handle,path,list,size) ((handle)->vfs_next.ops.llistxattr((handle)->vfs_next.handles.llistxattr,(path),(list),(size)))
-#define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) ((handle)->vfs_next.ops.flistxattr((handle)->vfs_next.handles.flistxattr,(fsp),(list),(size)))
-#define SMB_VFS_NEXT_REMOVEXATTR(handle,path,name) ((handle)->vfs_next.ops.removexattr((handle)->vfs_next.handles.removexattr,(path),(name)))
-#define SMB_VFS_NEXT_LREMOVEXATTR(handle,path,name) ((handle)->vfs_next.ops.lremovexattr((handle)->vfs_next.handles.lremovexattr,(path),(name)))
-#define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) ((handle)->vfs_next.ops.fremovexattr((handle)->vfs_next.handles.fremovexattr,(fsp),(name)))
-#define SMB_VFS_NEXT_SETXATTR(handle,path,name,value,size,flags) ((handle)->vfs_next.ops.setxattr((handle)->vfs_next.handles.setxattr,(path),(name),(value),(size),(flags)))
-#define SMB_VFS_NEXT_LSETXATTR(handle,path,name,value,size,flags) ((handle)->vfs_next.ops.lsetxattr((handle)->vfs_next.handles.lsetxattr,(path),(name),(value),(size),(flags)))
-#define SMB_VFS_NEXT_FSETXATTR(handle,fsp,name,value,size,flags) ((handle)->vfs_next.ops.fsetxattr((handle)->vfs_next.handles.fsetxattr,(fsp),(name),(value),(size),(flags)))
-
-/* AIO operations. */
-#define SMB_VFS_NEXT_AIO_READ(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_read((handle)->vfs_next.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_WRITE(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_write((handle)->vfs_next.handles.aio_write,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_RETURN(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_return_fn((handle)->vfs_next.handles.aio_return,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_CANCEL(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_cancel((handle)->vfs_next.handles.aio_cancel,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_ERROR(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_error_fn((handle)->vfs_next.handles.aio_error,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_FSYNC(handle,fsp,op,aiocb) ((handle)->vfs_next.ops.aio_fsync((handle)->vfs_next.handles.aio_fsync,(fsp),(op),(aiocb)))
-#define SMB_VFS_NEXT_AIO_SUSPEND(handle,fsp,aiocb,n,ts) ((handle)->vfs_next.ops.aio_suspend((handle)->vfs_next.handles.aio_suspend,(fsp),(aiocb),(n),(ts)))
-#define SMB_VFS_NEXT_AIO_FORCE(handle,fsp) ((handle)->vfs_next.ops.aio_force((handle)->vfs_next.handles.aio_force,(fsp)))
-
-/* Offline operations */
-#define SMB_VFS_NEXT_IS_OFFLINE(handle,path,sbuf) ((handle)->vfs_next.ops.is_offline((handle)->vfs_next.handles.is_offline,(path),(sbuf)))
-#define SMB_VFS_NEXT_SET_OFFLINE(handle,path) ((handle)->vfs_next.ops.set_offline((handle)->vfs_next.handles.set_offline,(path)))
+#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) \
+ smb_vfs_call_open((conn)->vfs_handles, (fname), (fsp), (flags), (mode))
+#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) \
+ smb_vfs_call_open((handle)->next, (fname), (fsp), (flags), (mode))
+
+#define SMB_VFS_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) \
+ smb_vfs_call_create_file((conn)->vfs_handles, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo))
+#define SMB_VFS_NEXT_CREATE_FILE(handle, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) \
+ smb_vfs_call_create_file((handle)->next, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo))
+
+#define SMB_VFS_CLOSE(fsp) \
+ smb_vfs_call_close_fn((fsp)->conn->vfs_handles, (fsp))
+#define SMB_VFS_NEXT_CLOSE(handle, fsp) \
+ smb_vfs_call_close_fn((handle)->next, (fsp))
+
+#define SMB_VFS_READ(fsp, data, n) \
+ smb_vfs_call_vfs_read((fsp)->conn->vfs_handles, (fsp), (data), (n))
+#define SMB_VFS_NEXT_READ(handle, fsp, data, n) \
+ smb_vfs_call_vfs_read((handle)->next, (fsp), (data), (n))
+
+#define SMB_VFS_PREAD(fsp, data, n, off) \
+ smb_vfs_call_pread((fsp)->conn->vfs_handles, (fsp), (data), (n), (off))
+#define SMB_VFS_NEXT_PREAD(handle, fsp, data, n, off) \
+ smb_vfs_call_pread((handle)->next, (fsp), (data), (n), (off))
+
+#define SMB_VFS_WRITE(fsp, data, n) \
+ smb_vfs_call_write((fsp)->conn->vfs_handles, (fsp), (data), (n))
+#define SMB_VFS_NEXT_WRITE(handle, fsp, data, n) \
+ smb_vfs_call_write((handle)->next, (fsp), (data), (n))
+
+#define SMB_VFS_PWRITE(fsp, data, n, off) \
+ smb_vfs_call_pwrite((fsp)->conn->vfs_handles, (fsp), (data), (n), (off))
+#define SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, off) \
+ smb_vfs_call_pwrite((handle)->next, (fsp), (data), (n), (off))
+
+#define SMB_VFS_LSEEK(fsp, offset, whence) \
+ smb_vfs_call_lseek((fsp)->conn->vfs_handles, (fsp), (offset), (whence))
+#define SMB_VFS_NEXT_LSEEK(handle, fsp, offset, whence) \
+ smb_vfs_call_lseek((handle)->next, (fsp), (offset), (whence))
+
+#define SMB_VFS_SENDFILE(tofd, fromfsp, header, offset, count) \
+ smb_vfs_call_sendfile((fromfsp)->conn->vfs_handles, (tofd), (fromfsp), (header), (offset), (count))
+#define SMB_VFS_NEXT_SENDFILE(handle, tofd, fromfsp, header, offset, count) \
+ smb_vfs_call_sendfile((handle)->next, (tofd), (fromfsp), (header), (offset), (count))
+
+#define SMB_VFS_RECVFILE(fromfd, tofsp, offset, count) \
+ smb_vfs_call_recvfile((tofsp)->conn->vfs_handles, (fromfd), (tofsp), (offset), (count))
+#define SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, count) \
+ smb_vfs_call_recvfile((handle)->next, (fromfd), (tofsp), (offset), (count))
+
+#define SMB_VFS_RENAME(conn, old, new) \
+ smb_vfs_call_rename((conn)->vfs_handles, (old), (new))
+#define SMB_VFS_NEXT_RENAME(handle, old, new) \
+ smb_vfs_call_rename((handle)->next, (old), (new))
+
+#define SMB_VFS_FSYNC(fsp) \
+ smb_vfs_call_fsync((fsp)->conn->vfs_handles, (fsp))
+#define SMB_VFS_NEXT_FSYNC(handle, fsp) \
+ smb_vfs_call_fsync((handle)->next, (fsp))
+
+#define SMB_VFS_STAT(conn, smb_fname) \
+ smb_vfs_call_stat((conn)->vfs_handles, (smb_fname))
+#define SMB_VFS_NEXT_STAT(handle, smb_fname) \
+ smb_vfs_call_stat((handle)->next, (smb_fname))
+
+#define SMB_VFS_FSTAT(fsp, sbuf) \
+ smb_vfs_call_fstat((fsp)->conn->vfs_handles, (fsp), (sbuf))
+#define SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf) \
+ smb_vfs_call_fstat((handle)->next, (fsp), (sbuf))
+
+#define SMB_VFS_LSTAT(conn, smb_fname) \
+ smb_vfs_call_lstat((conn)->vfs_handles, (smb_fname))
+#define SMB_VFS_NEXT_LSTAT(handle, smb_fname) \
+ smb_vfs_call_lstat((handle)->next, (smb_fname))
+
+#define SMB_VFS_GET_ALLOC_SIZE(conn, fsp, sbuf) \
+ smb_vfs_call_get_alloc_size((conn)->vfs_handles, (fsp), (sbuf))
+#define SMB_VFS_NEXT_GET_ALLOC_SIZE(conn, fsp, sbuf) \
+ smb_vfs_call_get_alloc_size((conn)->next, (fsp), (sbuf))
+
+#define SMB_VFS_UNLINK(conn, path) \
+ smb_vfs_call_unlink((conn)->vfs_handles, (path))
+#define SMB_VFS_NEXT_UNLINK(handle, path) \
+ smb_vfs_call_unlink((handle)->next, (path))
+
+#define SMB_VFS_CHMOD(conn, path, mode) \
+ smb_vfs_call_chmod((conn)->vfs_handles, (path), (mode))
+#define SMB_VFS_NEXT_CHMOD(handle, path, mode) \
+ smb_vfs_call_chmod((handle)->next, (path), (mode))
+
+#define SMB_VFS_FCHMOD(fsp, mode) \
+ smb_vfs_call_fchmod((fsp)->conn->vfs_handles, (fsp), (mode))
+#define SMB_VFS_NEXT_FCHMOD(handle, fsp, mode) \
+ smb_vfs_call_fchmod((handle)->next, (fsp), (mode))
+
+#define SMB_VFS_CHOWN(conn, path, uid, gid) \
+ smb_vfs_call_chown((conn)->vfs_handles, (path), (uid), (gid))
+#define SMB_VFS_NEXT_CHOWN(handle, path, uid, gid) \
+ smb_vfs_call_chown((handle)->next, (path), (uid), (gid))
+
+#define SMB_VFS_FCHOWN(fsp, uid, gid) \
+ smb_vfs_call_fchown((fsp)->conn->vfs_handles, (fsp), (uid), (gid))
+#define SMB_VFS_NEXT_FCHOWN(handle, fsp, uid, gid) \
+ smb_vfs_call_fchown((handle)->next, (fsp), (uid), (gid))
+
+#define SMB_VFS_LCHOWN(conn, path, uid, gid) \
+ smb_vfs_call_lchown((conn)->vfs_handles, (path), (uid), (gid))
+#define SMB_VFS_NEXT_LCHOWN(handle, path, uid, gid) \
+ smb_vfs_call_lchown((handle)->next, (path), (uid), (gid))
+
+#define SMB_VFS_CHDIR(conn, path) \
+ smb_vfs_call_chdir((conn)->vfs_handles, (path))
+#define SMB_VFS_NEXT_CHDIR(handle, path) \
+ smb_vfs_call_chdir((handle)->next, (path))
+
+#define SMB_VFS_GETWD(conn, buf) \
+ smb_vfs_call_getwd((conn)->vfs_handles, (buf))
+#define SMB_VFS_NEXT_GETWD(handle, buf) \
+ smb_vfs_call_getwd((handle)->next, (buf))
+
+#define SMB_VFS_NTIMES(conn, path, ts) \
+ smb_vfs_call_ntimes((conn)->vfs_handles, (path), (ts))
+#define SMB_VFS_NEXT_NTIMES(handle, path, ts) \
+ smb_vfs_call_ntimes((handle)->next, (path), (ts))
+
+#define SMB_VFS_FTRUNCATE(fsp, offset) \
+ smb_vfs_call_ftruncate((fsp)->conn->vfs_handles, (fsp), (offset))
+#define SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset) \
+ smb_vfs_call_ftruncate((handle)->next, (fsp), (offset))
+
+#define SMB_VFS_LOCK(fsp, op, offset, count, type) \
+ smb_vfs_call_lock((fsp)->conn->vfs_handles, (fsp), (op), (offset), (count), (type))
+#define SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type) \
+ smb_vfs_call_lock((handle)->next, (fsp), (op), (offset), (count), (type))
+
+#define SMB_VFS_KERNEL_FLOCK(fsp, share_mode) \
+ smb_vfs_call_kernel_flock((fsp)->conn->vfs_handles, (fsp), (share_mode))
+#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode) \
+ smb_vfs_call_kernel_flock((handle)->next, (fsp), (share_mode))
+
+#define SMB_VFS_LINUX_SETLEASE(fsp, leasetype) \
+ smb_vfs_call_linux_setlease((fsp)->conn->vfs_handles, (fsp), (leasetype))
+#define SMB_VFS_NEXT_LINUX_SETLEASE(handle, fsp, leasetype) \
+ smb_vfs_call_linux_setlease((handle)->next, (fsp), (leasetype))
+
+#define SMB_VFS_GETLOCK(fsp, poffset, pcount, ptype, ppid) \
+ smb_vfs_call_getlock((fsp)->conn->vfs_handles, (fsp), (poffset), (pcount), (ptype), (ppid))
+#define SMB_VFS_NEXT_GETLOCK(handle, fsp, poffset, pcount, ptype, ppid) \
+ smb_vfs_call_getlock((handle)->next, (fsp), (poffset), (pcount), (ptype), (ppid))
+
+#define SMB_VFS_SYMLINK(conn, oldpath, newpath) \
+ smb_vfs_call_symlink((conn)->vfs_handles, (oldpath), (newpath))
+#define SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath) \
+ smb_vfs_call_symlink((handle)->next, (oldpath), (newpath))
+
+#define SMB_VFS_READLINK(conn, path, buf, bufsiz) \
+ smb_vfs_call_vfs_readlink((conn)->vfs_handles, (path), (buf), (bufsiz))
+#define SMB_VFS_NEXT_READLINK(handle, path, buf, bufsiz) \
+ smb_vfs_call_vfs_readlink((handle)->next, (path), (buf), (bufsiz))
+
+#define SMB_VFS_LINK(conn, oldpath, newpath) \
+ smb_vfs_call_link((conn)->vfs_handles, (oldpath), (newpath))
+#define SMB_VFS_NEXT_LINK(handle, oldpath, newpath) \
+ smb_vfs_call_link((handle)->next, (oldpath), (newpath))
+
+#define SMB_VFS_MKNOD(conn, path, mode, dev) \
+ smb_vfs_call_mknod((conn)->vfs_handles, (path), (mode), (dev))
+#define SMB_VFS_NEXT_MKNOD(handle, path, mode, dev) \
+ smb_vfs_call_mknod((handle)->next, (path), (mode), (dev))
+
+#define SMB_VFS_REALPATH(conn, path, resolved_path) \
+ smb_vfs_call_realpath((conn)->vfs_handles, (path), (resolved_path))
+#define SMB_VFS_NEXT_REALPATH(handle, path, resolved_path) \
+ smb_vfs_call_realpath((handle)->next, (path), (resolved_path))
+
+#define SMB_VFS_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) \
+ smb_vfs_call_notify_watch((conn)->vfs_handles, (ctx), (e), (callback), (private_data), (handle_p))
+#define SMB_VFS_NEXT_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) \
+ smb_vfs_call_notify_watch((conn)->next, (ctx), (e), (callback), (private_data), (handle_p))
+
+#define SMB_VFS_CHFLAGS(conn, path, flags) \
+ smb_vfs_call_chflags((conn)->vfs_handles, (path), (flags))
+#define SMB_VFS_NEXT_CHFLAGS(handle, path, flags) \
+ smb_vfs_call_chflags((handle)->next, (path), (flags))
+
+#define SMB_VFS_FILE_ID_CREATE(conn, sbuf) \
+ smb_vfs_call_file_id_create((conn)->vfs_handles, (sbuf))
+#define SMB_VFS_NEXT_FILE_ID_CREATE(handle, sbuf) \
+ smb_vfs_call_file_id_create((handle)->next, (sbuf))
+
+#define SMB_VFS_STREAMINFO(conn, fsp, fname, mem_ctx, num_streams, streams) \
+ smb_vfs_call_streaminfo((conn)->vfs_handles, (fsp), (fname), (mem_ctx), (num_streams), (streams))
+#define SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, num_streams, streams) \
+ smb_vfs_call_streaminfo((handle)->next, (fsp), (fname), (mem_ctx), (num_streams), (streams))
+
+#define SMB_VFS_GET_REAL_FILENAME(conn, path, name, mem_ctx, found_name) \
+ smb_vfs_call_get_real_filename((conn)->vfs_handles, (path), (name), (mem_ctx), (found_name))
+#define SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name, mem_ctx, found_name) \
+ smb_vfs_call_get_real_filename((handle)->next, (path), (name), (mem_ctx), (found_name))
+
+#define SMB_VFS_CONNECTPATH(conn, fname) \
+ smb_vfs_call_connectpath((conn)->vfs_handles, (fname))
+#define SMB_VFS_NEXT_CONNECTPATH(conn, fname) \
+ smb_vfs_call_connectpath((conn)->next, (fname))
+
+#define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) \
+ smb_vfs_call_brl_lock_windows((conn)->vfs_handles, (br_lck), (plock), (blocking_lock), (blr))
+#define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock, blocking_lock, blr) \
+ smb_vfs_call_brl_lock_windows((handle)->next, (br_lck), (plock), (blocking_lock), (blr))
+
+#define SMB_VFS_BRL_UNLOCK_WINDOWS(conn, msg_ctx, br_lck, plock) \
+ smb_vfs_call_brl_unlock_windows((conn)->vfs_handles, (msg_ctx), (br_lck), (plock))
+#define SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock) \
+ smb_vfs_call_brl_unlock_windows((handle)->next, (msg_ctx), (br_lck), (plock))
+
+#define SMB_VFS_BRL_CANCEL_WINDOWS(conn, br_lck, plock, blr) \
+ smb_vfs_call_brl_cancel_windows((conn)->vfs_handles, (br_lck), (plock), (blr))
+#define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock, blr) \
+ smb_vfs_call_brl_cancel_windows((handle)->next, (br_lck), (plock), (blr))
+
+#define SMB_VFS_STRICT_LOCK(conn, fsp, plock) \
+ smb_vfs_call_strict_lock((conn)->vfs_handles, (fsp), (plock))
+#define SMB_VFS_NEXT_STRICT_LOCK(handle, fsp, plock) \
+ smb_vfs_call_strict_lock((handle)->next, (fsp), (plock))
+
+#define SMB_VFS_STRICT_UNLOCK(conn, fsp, plock) \
+ smb_vfs_call_strict_unlock((conn)->vfs_handles, (fsp), (plock))
+#define SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock) \
+ smb_vfs_call_strict_unlock((handle)->next, (fsp), (plock))
+
+#define SMB_VFS_FGET_NT_ACL(fsp, security_info, ppdesc) \
+ smb_vfs_call_fget_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info), (ppdesc))
+#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc) \
+ smb_vfs_call_fget_nt_acl((handle)->next, (fsp), (security_info), (ppdesc))
+
+#define SMB_VFS_GET_NT_ACL(conn, name, security_info, ppdesc) \
+ smb_vfs_call_get_nt_acl((conn)->vfs_handles, (name), (security_info), (ppdesc))
+#define SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, ppdesc) \
+ smb_vfs_call_get_nt_acl((handle)->next, (name), (security_info), (ppdesc))
+
+#define SMB_VFS_FSET_NT_ACL(fsp, security_info_sent, psd) \
+ smb_vfs_call_fset_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info_sent), (psd))
+#define SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd) \
+ smb_vfs_call_fset_nt_acl((handle)->next, (fsp), (security_info_sent), (psd))
+
+#define SMB_VFS_CHMOD_ACL(conn, name, mode) \
+ smb_vfs_call_chmod_acl((conn)->vfs_handles, (name), (mode))
+#define SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode) \
+ smb_vfs_call_chmod_acl((handle)->next, (name), (mode))
+
+#define SMB_VFS_FCHMOD_ACL(fsp, mode) \
+ smb_vfs_call_fchmod_acl((fsp)->conn->vfs_handles, (fsp), (mode))
+#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) \
+ smb_vfs_call_fchmod_acl((handle)->next, (fsp), (mode))
+
+#define SMB_VFS_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) \
+ smb_vfs_call_sys_acl_get_entry((conn)->vfs_handles, (theacl), (entry_id), (entry_p))
+#define SMB_VFS_NEXT_SYS_ACL_GET_ENTRY(handle, theacl, entry_id, entry_p) \
+ smb_vfs_call_sys_acl_get_entry((handle)->next, (theacl), (entry_id), (entry_p))
+
+#define SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) \
+ smb_vfs_call_sys_acl_get_tag_type((conn)->vfs_handles, (entry_d), (tag_type_p))
+#define SMB_VFS_NEXT_SYS_ACL_GET_TAG_TYPE(handle, entry_d, tag_type_p) \
+ smb_vfs_call_sys_acl_get_tag_type((handle)->next, (entry_d), (tag_type_p))
+
+#define SMB_VFS_SYS_ACL_GET_PERMSET(conn, entry_d, permset_p) \
+ smb_vfs_call_sys_acl_get_permset((conn)->vfs_handles, (entry_d), (permset_p))
+#define SMB_VFS_NEXT_SYS_ACL_GET_PERMSET(handle, entry_d, permset_p) \
+ smb_vfs_call_sys_acl_get_permset((handle)->next, (entry_d), (permset_p))
+
+#define SMB_VFS_SYS_ACL_GET_QUALIFIER(conn, entry_d) \
+ smb_vfs_call_sys_acl_get_qualifier((conn)->vfs_handles, (entry_d))
+#define SMB_VFS_NEXT_SYS_ACL_GET_QUALIFIER(handle, entry_d) \
+ smb_vfs_call_sys_acl_get_qualifier((handle)->next, (entry_d))
+
+#define SMB_VFS_SYS_ACL_GET_FILE(conn, path_p, type) \
+ smb_vfs_call_sys_acl_get_file((conn)->vfs_handles, (path_p), (type))
+#define SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, path_p, type) \
+ smb_vfs_call_sys_acl_get_file((handle)->next, (path_p), (type))
+
+#define SMB_VFS_SYS_ACL_GET_FD(fsp) \
+ smb_vfs_call_sys_acl_get_fd((fsp)->conn->vfs_handles, (fsp))
+#define SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp) \
+ smb_vfs_call_sys_acl_get_fd((handle)->next, (fsp))
+
+#define SMB_VFS_SYS_ACL_CLEAR_PERMS(conn, permset) \
+ smb_vfs_call_sys_acl_clear_perms((conn)->vfs_handles, (permset))
+#define SMB_VFS_NEXT_SYS_ACL_CLEAR_PERMS(handle, permset) \
+ smb_vfs_call_sys_acl_clear_perms((handle)->next, (permset))
+
+#define SMB_VFS_SYS_ACL_ADD_PERM(conn, permset, perm) \
+ smb_vfs_call_sys_acl_add_perm((conn)->vfs_handles, (permset), (perm))
+#define SMB_VFS_NEXT_SYS_ACL_ADD_PERM(handle, permset, perm) \
+ smb_vfs_call_sys_acl_add_perm((handle)->next, (permset), (perm))
+
+#define SMB_VFS_SYS_ACL_TO_TEXT(conn, theacl, plen) \
+ smb_vfs_call_sys_acl_to_text((conn)->vfs_handles, (theacl), (plen))
+#define SMB_VFS_NEXT_SYS_ACL_TO_TEXT(handle, theacl, plen) \
+ smb_vfs_call_sys_acl_to_text((handle)->next, (theacl), (plen))
+
+#define SMB_VFS_SYS_ACL_INIT(conn, count) \
+ smb_vfs_call_sys_acl_init((conn)->vfs_handles, (count))
+#define SMB_VFS_NEXT_SYS_ACL_INIT(handle, count) \
+ smb_vfs_call_sys_acl_init((handle)->next, (count))
+
+#define SMB_VFS_SYS_ACL_CREATE_ENTRY(conn, pacl, pentry) \
+ smb_vfs_call_sys_acl_create_entry((conn)->vfs_handles, (pacl), (pentry))
+#define SMB_VFS_NEXT_SYS_ACL_CREATE_ENTRY(handle, pacl, pentry) \
+ smb_vfs_call_sys_acl_create_entry((handle)->next, (pacl), (pentry))
+
+#define SMB_VFS_SYS_ACL_SET_TAG_TYPE(conn, entry, tagtype) \
+ smb_vfs_call_sys_acl_set_tag_type((conn)->vfs_handles, (entry), (tagtype))
+#define SMB_VFS_NEXT_SYS_ACL_SET_TAG_TYPE(handle, entry, tagtype) \
+ smb_vfs_call_sys_acl_set_tag_type((handle)->next, (entry), (tagtype))
+
+#define SMB_VFS_SYS_ACL_SET_QUALIFIER(conn, entry, qual) \
+ smb_vfs_call_sys_acl_set_qualifier((conn)->vfs_handles, (entry), (qual))
+#define SMB_VFS_NEXT_SYS_ACL_SET_QUALIFIER(handle, entry, qual) \
+ smb_vfs_call_sys_acl_set_qualifier((handle)->next, (entry), (qual))
+
+#define SMB_VFS_SYS_ACL_SET_PERMSET(conn, entry, permset) \
+ smb_vfs_call_sys_acl_set_permset((conn)->vfs_handles, (entry), (permset))
+#define SMB_VFS_NEXT_SYS_ACL_SET_PERMSET(handle, entry, permset) \
+ smb_vfs_call_sys_acl_set_permset((handle)->next, (entry), (permset))
+
+#define SMB_VFS_SYS_ACL_VALID(conn, theacl) \
+ smb_vfs_call_sys_acl_valid((conn)->vfs_handles, (theacl))
+#define SMB_VFS_NEXT_SYS_ACL_VALID(handle, theacl) \
+ smb_vfs_call_sys_acl_valid((handle)->next, (theacl))
+
+#define SMB_VFS_SYS_ACL_SET_FILE(conn, name, acltype, theacl) \
+ smb_vfs_call_sys_acl_set_file((conn)->vfs_handles, (name), (acltype), (theacl))
+#define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, name, acltype, theacl) \
+ smb_vfs_call_sys_acl_set_file((handle)->next, (name), (acltype), (theacl))
+
+#define SMB_VFS_SYS_ACL_SET_FD(fsp, theacl) \
+ smb_vfs_call_sys_acl_set_fd((fsp)->conn->vfs_handles, (fsp), (theacl))
+#define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl) \
+ smb_vfs_call_sys_acl_set_fd((handle)->next, (fsp), (theacl))
+
+#define SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, path) \
+ smb_vfs_call_sys_acl_delete_def_file((conn)->vfs_handles, (path))
+#define SMB_VFS_NEXT_SYS_ACL_DELETE_DEF_FILE(handle, path) \
+ smb_vfs_call_sys_acl_delete_def_file((handle)->next, (path))
+
+#define SMB_VFS_SYS_ACL_GET_PERM(conn, permset, perm) \
+ smb_vfs_call_sys_acl_get_perm((conn)->vfs_handles, (permset), (perm))
+#define SMB_VFS_NEXT_SYS_ACL_GET_PERM(handle, permset, perm) \
+ smb_vfs_call_sys_acl_get_perm((handle)->next, (permset), (perm))
+
+#define SMB_VFS_SYS_ACL_FREE_TEXT(conn, text) \
+ smb_vfs_call_sys_acl_free_text((conn)->vfs_handles, (text))
+#define SMB_VFS_NEXT_SYS_ACL_FREE_TEXT(handle, text) \
+ smb_vfs_call_sys_acl_free_text((handle)->next, (text))
+
+#define SMB_VFS_SYS_ACL_FREE_ACL(conn, posix_acl) \
+ smb_vfs_call_sys_acl_free_acl((conn)->vfs_handles, (posix_acl))
+#define SMB_VFS_NEXT_SYS_ACL_FREE_ACL(handle, posix_acl) \
+ smb_vfs_call_sys_acl_free_acl((handle)->next, (posix_acl))
+
+#define SMB_VFS_SYS_ACL_FREE_QUALIFIER(conn, qualifier, tagtype) \
+ smb_vfs_call_sys_acl_free_qualifier((conn)->vfs_handles, (qualifier), (tagtype))
+#define SMB_VFS_NEXT_SYS_ACL_FREE_QUALIFIER(handle, qualifier, tagtype) \
+ smb_vfs_call_sys_acl_free_qualifier((handle)->next, (qualifier), (tagtype))
+
+#define SMB_VFS_GETXATTR(conn,path,name,value,size) \
+ smb_vfs_call_getxattr((conn)->vfs_handles,(path),(name),(value),(size))
+#define SMB_VFS_NEXT_GETXATTR(handle,path,name,value,size) \
+ smb_vfs_call_getxattr((handle)->next,(path),(name),(value),(size))
+
+#define SMB_VFS_LGETXATTR(conn,path,name,value,size) \
+ smb_vfs_call_lgetxattr((conn)->vfs_handles,(path),(name),(value),(size))
+#define SMB_VFS_NEXT_LGETXATTR(handle,path,name,value,size) \
+ smb_vfs_call_lgetxattr((handle)->next,(path),(name),(value),(size))
+
+#define SMB_VFS_FGETXATTR(fsp,name,value,size) \
+ smb_vfs_call_fgetxattr((fsp)->conn->vfs_handles, (fsp), (name),(value),(size))
+#define SMB_VFS_NEXT_FGETXATTR(handle,fsp,name,value,size) \
+ smb_vfs_call_fgetxattr((handle)->next,(fsp),(name),(value),(size))
+
+#define SMB_VFS_LISTXATTR(conn,path,list,size) \
+ smb_vfs_call_listxattr((conn)->vfs_handles,(path),(list),(size))
+#define SMB_VFS_NEXT_LISTXATTR(handle,path,list,size) \
+ smb_vfs_call_listxattr((handle)->next,(path),(list),(size))
+
+#define SMB_VFS_LLISTXATTR(conn,path,list,size) \
+ smb_vfs_call_llistxattr((conn)->vfs_handles,(path),(list),(size))
+#define SMB_VFS_NEXT_LLISTXATTR(handle,path,list,size) \
+ smb_vfs_call_llistxattr((handle)->next,(path),(list),(size))
+
+#define SMB_VFS_FLISTXATTR(fsp,list,size) \
+ smb_vfs_call_flistxattr((fsp)->conn->vfs_handles, (fsp), (list),(size))
+#define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) \
+ smb_vfs_call_flistxattr((handle)->next,(fsp),(list),(size))
+
+#define SMB_VFS_REMOVEXATTR(conn,path,name) \
+ smb_vfs_call_removexattr((conn)->vfs_handles,(path),(name))
+#define SMB_VFS_NEXT_REMOVEXATTR(handle,path,name) \
+ smb_vfs_call_removexattr((handle)->next,(path),(name))
+
+#define SMB_VFS_LREMOVEXATTR(conn,path,name) \
+ smb_vfs_call_lremovexattr((conn)->vfs_handles,(path),(name))
+#define SMB_VFS_NEXT_LREMOVEXATTR(handle,path,name) \
+ smb_vfs_call_lremovexattr((handle)->next,(path),(name))
+
+#define SMB_VFS_FREMOVEXATTR(fsp,name) \
+ smb_vfs_call_fremovexattr((fsp)->conn->vfs_handles, (fsp), (name))
+#define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) \
+ smb_vfs_call_fremovexattr((handle)->next,(fsp),(name))
+
+#define SMB_VFS_SETXATTR(conn,path,name,value,size,flags) \
+ smb_vfs_call_setxattr((conn)->vfs_handles,(path),(name),(value),(size),(flags))
+#define SMB_VFS_NEXT_SETXATTR(handle,path,name,value,size,flags) \
+ smb_vfs_call_setxattr((handle)->next,(path),(name),(value),(size),(flags))
+
+#define SMB_VFS_LSETXATTR(conn,path,name,value,size,flags) \
+ smb_vfs_call_lsetxattr((conn)->vfs_handles,(path),(name),(value),(size),(flags))
+#define SMB_VFS_NEXT_LSETXATTR(handle,path,name,value,size,flags) \
+ smb_vfs_call_lsetxattr((handle)->next,(path),(name),(value),(size),(flags))
+
+#define SMB_VFS_FSETXATTR(fsp,name,value,size,flags) \
+ smb_vfs_call_fsetxattr((fsp)->conn->vfs_handles, (fsp), (name),(value),(size),(flags))
+#define SMB_VFS_NEXT_FSETXATTR(handle,fsp,name,value,size,flags) \
+ smb_vfs_call_fsetxattr((handle)->next,(fsp),(name),(value),(size),(flags))
+
+#define SMB_VFS_AIO_READ(fsp,aiocb) \
+ smb_vfs_call_aio_read((fsp)->conn->vfs_handles, (fsp), (aiocb))
+#define SMB_VFS_NEXT_AIO_READ(handle,fsp,aiocb) \
+ smb_vfs_call_aio_read((handle)->next,(fsp),(aiocb))
+
+#define SMB_VFS_AIO_WRITE(fsp,aiocb) \
+ smb_vfs_call_aio_write((fsp)->conn->vfs_handles, (fsp), (aiocb))
+#define SMB_VFS_NEXT_AIO_WRITE(handle,fsp,aiocb) \
+ smb_vfs_call_aio_write((handle)->next,(fsp),(aiocb))
+
+#define SMB_VFS_AIO_RETURN(fsp,aiocb) \
+ smb_vfs_call_aio_return_fn((fsp)->conn->vfs_handles, (fsp), (aiocb))
+#define SMB_VFS_NEXT_AIO_RETURN(handle,fsp,aiocb) \
+ smb_vfs_call_aio_return_fn((handle)->next,(fsp),(aiocb))
+
+#define SMB_VFS_AIO_CANCEL(fsp,aiocb) \
+ smb_vfs_call_aio_cancel((fsp)->conn->vfs_handles, (fsp), (aiocb))
+#define SMB_VFS_NEXT_AIO_CANCEL(handle,fsp,aiocb) \
+ smb_vfs_call_aio_cancel((handle)->next,(fsp),(aiocb))
+
+#define SMB_VFS_AIO_ERROR(fsp,aiocb) \
+ smb_vfs_call_aio_error_fn((fsp)->conn->vfs_handles, (fsp),(aiocb))
+#define SMB_VFS_NEXT_AIO_ERROR(handle,fsp,aiocb) \
+ smb_vfs_call_aio_error_fn((handle)->next,(fsp),(aiocb))
+
+#define SMB_VFS_AIO_FSYNC(fsp,op,aiocb) \
+ smb_vfs_call_aio_fsync((fsp)->conn->vfs_handles, (fsp), (op),(aiocb))
+#define SMB_VFS_NEXT_AIO_FSYNC(handle,fsp,op,aiocb) \
+ smb_vfs_call_aio_fsync((handle)->next,(fsp),(op),(aiocb))
+
+#define SMB_VFS_AIO_SUSPEND(fsp,aiocb,n,ts) \
+ smb_vfs_call_aio_suspend((fsp)->conn->vfs_handles, (fsp),(aiocb),(n),(ts))
+#define SMB_VFS_NEXT_AIO_SUSPEND(handle,fsp,aiocb,n,ts) \
+ smb_vfs_call_aio_suspend((handle)->next,(fsp),(aiocb),(n),(ts))
+
+#define SMB_VFS_AIO_FORCE(fsp) \
+ smb_vfs_call_aio_force((fsp)->conn->vfs_handles, (fsp))
+#define SMB_VFS_NEXT_AIO_FORCE(handle,fsp) \
+ smb_vfs_call_aio_force((handle)->next,(fsp))
+
+#define SMB_VFS_IS_OFFLINE(conn,path,sbuf) \
+ smb_vfs_call_is_offline((conn)->vfs_handles,(path),(sbuf))
+#define SMB_VFS_NEXT_IS_OFFLINE(handle,path,sbuf) \
+ smb_vfs_call_is_offline((handle)->next,(path),(sbuf))
+
+#define SMB_VFS_SET_OFFLINE(conn,path) \
+ smb_vfs_call_set_offline((conn)->vfs_handles,(path))
+#define SMB_VFS_NEXT_SET_OFFLINE(handle,path) \
+ smb_vfs_call_set_offline((handle)->next, (path))
#endif /* _VFS_MACROS_H */
diff --git a/source3/lib/file_id.c b/source3/lib/file_id.c
index 0902e3d2244..67c1dd0b1b0 100644
--- a/source3/lib/file_id.c
+++ b/source3/lib/file_id.c
@@ -22,14 +22,6 @@
#include "includes.h"
/*
- generate a file_id from a stat structure
- */
-struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf)
-{
- return SMB_VFS_FILE_ID_CREATE(conn, sbuf);
-}
-
-/*
return True if two file_id structures are equal
*/
bool file_id_equal(const struct file_id *id1, const struct file_id *id2)
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index a152830c5de..0e2ffda7a2e 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -270,7 +270,7 @@ parse_ace(struct cli_state *ipc_cli,
uint32_t mask;
const struct perm_value *v;
struct perm_value {
- const char *perm;
+ const char perm[7];
uint32 mask;
};
TALLOC_CTX *frame = talloc_stackframe();
@@ -283,14 +283,14 @@ parse_ace(struct cli_state *ipc_cli,
{ "D", 0x00010000 },
{ "P", 0x00040000 },
{ "O", 0x00080000 },
- { NULL, 0 },
+ { "", 0 },
};
static const struct perm_value standard_values[] = {
{ "READ", 0x001200a9 },
{ "CHANGE", 0x001301bf },
{ "FULL", 0x001f01ff },
- { NULL, 0 },
+ { "", 0 },
};
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index e238ec959b6..05d6c7f95d0 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -774,6 +774,17 @@ static NTSTATUS brl_lock_posix(struct messaging_context *msg_ctx,
return status;
}
+NTSTATUS smb_vfs_call_brl_lock_windows(struct vfs_handle_struct *handle,
+ struct byte_range_lock *br_lck,
+ struct lock_struct *plock,
+ bool blocking_lock,
+ struct blocking_lock_record *blr)
+{
+ VFS_FIND(brl_lock_windows);
+ return handle->fns->brl_lock_windows(handle, br_lck, plock,
+ blocking_lock, blr);
+}
+
/****************************************************************************
Lock a range of bytes.
****************************************************************************/
@@ -1116,6 +1127,15 @@ static bool brl_unlock_posix(struct messaging_context *msg_ctx,
return True;
}
+bool smb_vfs_call_brl_unlock_windows(struct vfs_handle_struct *handle,
+ struct messaging_context *msg_ctx,
+ struct byte_range_lock *br_lck,
+ const struct lock_struct *plock)
+{
+ VFS_FIND(brl_unlock_windows);
+ return handle->fns->brl_unlock_windows(handle, msg_ctx, br_lck, plock);
+}
+
/****************************************************************************
Unlock a range of bytes.
****************************************************************************/
@@ -1274,6 +1294,16 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
return NT_STATUS_OK;
}
+
+bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
+ struct byte_range_lock *br_lck,
+ struct lock_struct *plock,
+ struct blocking_lock_record *blr)
+{
+ VFS_FIND(brl_cancel_windows);
+ return handle->fns->brl_cancel_windows(handle, br_lck, plock, blr);
+}
+
/****************************************************************************
Remove a particular pending lock.
****************************************************************************/
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 33ffaf95caf..17945399c59 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -177,6 +177,14 @@ static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out,
return True;
}
+bool smb_vfs_call_lock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int op, SMB_OFF_T offset,
+ SMB_OFF_T count, int type)
+{
+ VFS_FIND(lock);
+ return handle->fns->lock(handle, fsp, op, offset, count, type);
+}
+
/****************************************************************************
Actual function that does POSIX locks. Copes with 64 -> 32 bit cruft and
broken NFS implementations.
@@ -220,6 +228,14 @@ static bool posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OF
return ret;
}
+bool smb_vfs_call_getlock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_OFF_T *poffset,
+ SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
+{
+ VFS_FIND(getlock);
+ return handle->fns->getlock(handle, fsp, poffset, pcount, ptype, ppid);
+}
+
/****************************************************************************
Actual function that gets POSIX locks. Copes with 64 -> 32 bit cruft and
broken NFS implementations.
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index ce84bd0e3af..5d1bb8728c9 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -937,32 +937,21 @@ static int sys_acl_set_fd_tdb(vfs_handle_struct *handle,
return 0;
}
-/* VFS operations structure */
-
-static vfs_op_tuple skel_op_tuples[] =
-{
- {SMB_VFS_OP(connect_acl_tdb), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(mkdir_acl_tdb), SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(rmdir_acl_tdb), SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(open_acl_tdb), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(unlink_acl_tdb), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT},
-
- /* NT File ACL operations */
-
- {SMB_VFS_OP(fget_nt_acl_tdb),SMB_VFS_OP_FGET_NT_ACL,SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(get_nt_acl_tdb), SMB_VFS_OP_GET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(fset_nt_acl_tdb),SMB_VFS_OP_FSET_NT_ACL,SMB_VFS_LAYER_TRANSPARENT},
-
- /* POSIX ACL operations. */
- {SMB_VFS_OP(sys_acl_set_file_tdb), SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(sys_acl_set_fd_tdb), SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_acl_tdb_fns = {
+ .connect_fn = connect_acl_tdb,
+ .mkdir = mkdir_acl_tdb,
+ .open = open_acl_tdb,
+ .unlink = unlink_acl_tdb,
+ .rmdir = rmdir_acl_tdb,
+ .fget_nt_acl = fget_nt_acl_tdb,
+ .get_nt_acl = get_nt_acl_tdb,
+ .fset_nt_acl = fset_nt_acl_tdb,
+ .sys_acl_set_file = sys_acl_set_file_tdb,
+ .sys_acl_set_fd = sys_acl_set_fd_tdb
};
NTSTATUS vfs_acl_tdb_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "acl_tdb", skel_op_tuples);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "acl_tdb",
+ &vfs_acl_tdb_fns);
}
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index b18bc658ffc..3646b659dcd 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -793,27 +793,19 @@ static int sys_acl_set_fd_xattr(vfs_handle_struct *handle,
return ret;
}
-/* VFS operations structure */
-static vfs_op_tuple skel_op_tuples[] =
-{
- {SMB_VFS_OP(mkdir_acl_xattr), SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(open_acl_xattr), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT},
-
- /* NT File ACL operations */
-
- {SMB_VFS_OP(fget_nt_acl_xattr),SMB_VFS_OP_FGET_NT_ACL,SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(get_nt_acl_xattr), SMB_VFS_OP_GET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(fset_nt_acl_xattr),SMB_VFS_OP_FSET_NT_ACL,SMB_VFS_LAYER_TRANSPARENT},
-
- /* POSIX ACL operations. */
- {SMB_VFS_OP(sys_acl_set_file_xattr), SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(sys_acl_set_fd_xattr), SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_acl_xattr_fns = {
+ .mkdir = mkdir_acl_xattr,
+ .open = open_acl_xattr,
+ .fget_nt_acl = fget_nt_acl_xattr,
+ .get_nt_acl = get_nt_acl_xattr,
+ .fset_nt_acl = fset_nt_acl_xattr,
+ .sys_acl_set_file = sys_acl_set_file_xattr,
+ .sys_acl_set_fd = sys_acl_set_fd_xattr
};
NTSTATUS vfs_acl_xattr_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "acl_xattr", skel_op_tuples);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "acl_xattr",
+ &vfs_acl_xattr_fns);
}
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index e6f43c96809..1c310c71859 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/modules/vfs_afsacl.c
@@ -1068,23 +1068,16 @@ static int afsacl_connect(vfs_handle_struct *handle,
return SMB_VFS_NEXT_CONNECT(handle, service, user);
}
-/* VFS operations structure */
-
-static vfs_op_tuple afsacl_ops[] = {
- {SMB_VFS_OP(afsacl_connect), SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(afsacl_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(afsacl_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(afsacl_fset_nt_acl), SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_afsacl_fns = {
+ .connect_fn = afsacl_connect,
+ .fget_nt_acl = afsacl_fget_nt_acl,
+ .get_nt_acl = afsacl_get_nt_acl,
+ .fset_nt_acl = afsacl_fset_nt_acl
};
NTSTATUS vfs_afsacl_init(void);
NTSTATUS vfs_afsacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "afsacl",
- afsacl_ops);
+ &vfs_afsacl_fns);
}
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c
index cb4ad0cf826..4468fe097f0 100644
--- a/source3/modules/vfs_aio_fork.c
+++ b/source3/modules/vfs_aio_fork.c
@@ -723,26 +723,17 @@ static int aio_fork_error_fn(struct vfs_handle_struct *handle,
return child->retval.ret_errno;
}
-/* VFS operations structure */
-
-static vfs_op_tuple aio_fork_ops[] = {
- {SMB_VFS_OP(aio_fork_read), SMB_VFS_OP_AIO_READ,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(aio_fork_write), SMB_VFS_OP_AIO_WRITE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(aio_fork_return_fn), SMB_VFS_OP_AIO_RETURN,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(aio_fork_cancel), SMB_VFS_OP_AIO_CANCEL,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(aio_fork_error_fn), SMB_VFS_OP_AIO_ERROR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_aio_fork_fns = {
+ .aio_read = aio_fork_read,
+ .aio_write = aio_fork_write,
+ .aio_return_fn = aio_fork_return_fn,
+ .aio_cancel = aio_fork_cancel,
+ .aio_error_fn = aio_fork_error_fn,
};
NTSTATUS vfs_aio_fork_init(void);
NTSTATUS vfs_aio_fork_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
- "aio_fork", aio_fork_ops);
+ "aio_fork", &vfs_aio_fork_fns);
}
diff --git a/source3/modules/vfs_aixacl.c b/source3/modules/vfs_aixacl.c
index 726a7f485e8..a4f58db0ba7 100644
--- a/source3/modules/vfs_aixacl.c
+++ b/source3/modules/vfs_aixacl.c
@@ -177,38 +177,17 @@ int aixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
return 0; /* otherwise you can't set acl at upper level */
}
-/* VFS operations structure */
-
-static vfs_op_tuple aixacl_op_tuples[] = {
- /* Disk operations */
- {SMB_VFS_OP(aixacl_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixacl_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixacl_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixacl_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixacl_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_aixacl_fns = {
+ .sys_acl_get_file = aixacl_sys_acl_get_file,
+ .sys_acl_get_fd = aixacl_sys_acl_get_fd,
+ .sys_acl_set_file = aixacl_sys_acl_set_file,
+ .sys_acl_set_fd = aixacl_sys_acl_set_fd,
+ .sys_acl_delete_def_file = aixacl_sys_acl_delete_def_file,
};
NTSTATUS vfs_aixacl_init(void);
NTSTATUS vfs_aixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "aixacl",
- aixacl_op_tuples);
+ &vfs_aixacl_fns);
}
diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c
index 01de33ed0bd..42fb4571fc7 100644
--- a/source3/modules/vfs_aixacl2.c
+++ b/source3/modules/vfs_aixacl2.c
@@ -484,51 +484,20 @@ int aixjfs2_sys_acl_delete_def_file(vfs_handle_struct *handle,
return 0;
}
-
-/* VFS operations structure */
-
-static vfs_op_tuple aixjfs2_ops[] =
-{
- {SMB_VFS_OP(aixjfs2_fget_nt_acl),
- SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixjfs2_get_nt_acl),
- SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixjfs2_fset_nt_acl),
- SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixjfs2_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixjfs2_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixjfs2_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixjfs2_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(aixjfs2_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
-};
+static struct vfs_fn_pointers vfs_aixacl2_fns = {
+ .fget_nt_acl = aixjfs2_fget_nt_acl,
+ .get_nt_acl = aixjfs2_get_nt_acl,
+ .fset_nt_acl = aixjfs2_fset_nt_acl,
+ .sys_acl_get_file = aixjfs2_sys_acl_get_file,
+ .sys_acl_get_fd = aixjfs2_sys_acl_get_fd,
+ .sys_acl_set_file = aixjfs2_sys_acl_set_file,
+ .sys_acl_set_fd = aixjfs2_sys_acl_set_fd,
+ .sys_acl_delete_def_file = aixjfs2_sys_acl_delete_def_file
+}
NTSTATUS vfs_aixacl2_init(void);
NTSTATUS vfs_aixacl2_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, AIXACL2_MODULE_NAME,
- aixjfs2_ops);
+ &vfs_aixacl2_fns);
}
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index dab3d78cece..258246e42db 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -258,37 +258,24 @@ static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t
return result;
}
-/* VFS operations */
-static vfs_op_tuple audit_op_tuples[] = {
-
- /* Disk operations */
-
- {SMB_VFS_OP(audit_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_disconnect), SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_LOGGER},
-
- /* Directory operations */
-
- {SMB_VFS_OP(audit_opendir), SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_mkdir), SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_rmdir), SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_LOGGER},
-
- /* File operations */
-
- {SMB_VFS_OP(audit_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_close), SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_rename), SMB_VFS_OP_RENAME, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_chmod), SMB_VFS_OP_CHMOD, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_fchmod), SMB_VFS_OP_FCHMOD, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_chmod_acl), SMB_VFS_OP_CHMOD_ACL, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_fchmod_acl), SMB_VFS_OP_FCHMOD_ACL, SMB_VFS_LAYER_LOGGER},
-
- /* Finish VFS operations definition */
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_audit_fns = {
+ .connect_fn = audit_connect,
+ .disconnect = audit_disconnect,
+ .opendir = audit_opendir,
+ .mkdir = audit_mkdir,
+ .rmdir = audit_rmdir,
+ .open = audit_open,
+ .close_fn = audit_close,
+ .rename = audit_rename,
+ .unlink = audit_unlink,
+ .chmod = audit_chmod,
+ .fchmod = audit_fchmod,
+ .chmod_acl = audit_chmod_acl,
+ .fchmod_acl = audit_fchmod_acl
};
NTSTATUS vfs_audit_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "audit", audit_op_tuples);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "audit",
+ &vfs_audit_fns);
}
diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c
index 3997dcbcfc9..d107c5fc960 100644
--- a/source3/modules/vfs_cacheprime.c
+++ b/source3/modules/vfs_cacheprime.c
@@ -168,18 +168,11 @@ static ssize_t cprime_pread(
return SMB_VFS_NEXT_PREAD(handle, fsp, data, count, offset);
}
-static vfs_op_tuple cprime_ops [] =
-{
- {SMB_VFS_OP(cprime_sendfile),
- SMB_VFS_OP_SENDFILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cprime_pread),
- SMB_VFS_OP_PREAD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cprime_read),
- SMB_VFS_OP_READ, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cprime_connect),
- SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_cacheprime_fns = {
+ .sendfile = cprime_sendfile,
+ .pread = cprime_pread,
+ .vfs_read = cprime_read,
+ .connect_fn = cprime_connect,
};
/* -------------------------------------------------------------------------
@@ -190,7 +183,8 @@ static vfs_op_tuple cprime_ops [] =
NTSTATUS vfs_cacheprime_init(void);
NTSTATUS vfs_cacheprime_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE, cprime_ops);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE,
+ &vfs_cacheprime_fns);
}
/* vim: set sw=4 ts=4 tw=79 et: */
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index aa77da7cd72..7edbb8783c7 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -401,10 +401,6 @@ static int cap_chmod_acl(vfs_handle_struct *handle, const char *path, mode_t mod
char *cappath = capencode(talloc_tos(), path);
/* If the underlying VFS doesn't have ACL support... */
- if (!handle->vfs_next.ops.chmod_acl) {
- errno = ENOSYS;
- return -1;
- }
if (!cappath) {
errno = ENOMEM;
return -1;
@@ -573,67 +569,49 @@ static int cap_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, co
return SMB_VFS_NEXT_FSETXATTR(handle, fsp, cappath, value, size, flags);
}
-/* VFS operations structure */
-
-static vfs_op_tuple cap_op_tuples[] = {
-
- /* Disk operations */
-
- {SMB_VFS_OP(cap_disk_free), SMB_VFS_OP_DISK_FREE, SMB_VFS_LAYER_TRANSPARENT},
-
- /* Directory operations */
-
- {SMB_VFS_OP(cap_opendir), SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_readdir), SMB_VFS_OP_READDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_mkdir), SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_rmdir), SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_TRANSPARENT},
-
- /* File operations */
-
- {SMB_VFS_OP(cap_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_rename), SMB_VFS_OP_RENAME, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_stat), SMB_VFS_OP_STAT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_lstat), SMB_VFS_OP_LSTAT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_chmod), SMB_VFS_OP_CHMOD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_chown), SMB_VFS_OP_CHOWN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_lchown), SMB_VFS_OP_LCHOWN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_chdir), SMB_VFS_OP_CHDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_ntimes), SMB_VFS_OP_NTIMES, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_symlink), SMB_VFS_OP_SYMLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_readlink), SMB_VFS_OP_READLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_link), SMB_VFS_OP_LINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_mknod), SMB_VFS_OP_MKNOD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_realpath), SMB_VFS_OP_REALPATH, SMB_VFS_LAYER_TRANSPARENT},
-
- /* POSIX ACL operations */
-
- {SMB_VFS_OP(cap_chmod_acl), SMB_VFS_OP_CHMOD_ACL, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(cap_sys_acl_get_file), SMB_VFS_OP_SYS_ACL_GET_FILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_sys_acl_set_file), SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_sys_acl_delete_def_file), SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, SMB_VFS_LAYER_TRANSPARENT},
-
- /* EA operations. */
- {SMB_VFS_OP(cap_getxattr), SMB_VFS_OP_GETXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_lgetxattr), SMB_VFS_OP_LGETXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_fgetxattr), SMB_VFS_OP_FGETXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_listxattr), SMB_VFS_OP_LISTXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_llistxattr), SMB_VFS_OP_LLISTXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_removexattr), SMB_VFS_OP_REMOVEXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_lremovexattr), SMB_VFS_OP_LREMOVEXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_fremovexattr), SMB_VFS_OP_FREMOVEXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_setxattr), SMB_VFS_OP_SETXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_lsetxattr), SMB_VFS_OP_LSETXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(cap_fsetxattr), SMB_VFS_OP_FSETXATTR, SMB_VFS_LAYER_TRANSPARENT},
-
- {NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_cap_fns = {
+ .disk_free = cap_disk_free,
+ .opendir = cap_opendir,
+ .readdir = cap_readdir,
+ .mkdir = cap_mkdir,
+ .rmdir = cap_rmdir,
+ .open = cap_open,
+ .rename = cap_rename,
+ .stat = cap_stat,
+ .lstat = cap_lstat,
+ .unlink = cap_unlink,
+ .chmod = cap_chmod,
+ .chown = cap_chown,
+ .lchown = cap_lchown,
+ .chdir = cap_chdir,
+ .ntimes = cap_ntimes,
+ .symlink = cap_symlink,
+ .vfs_readlink = cap_readlink,
+ .link = cap_link,
+ .mknod = cap_mknod,
+ .realpath = cap_realpath,
+ .chmod_acl = cap_chmod_acl,
+ .sys_acl_get_file = cap_sys_acl_get_file,
+ .sys_acl_set_file = cap_sys_acl_set_file,
+ .sys_acl_delete_def_file = cap_sys_acl_delete_def_file,
+ .getxattr = cap_getxattr,
+ .lgetxattr = cap_lgetxattr,
+ .fgetxattr = cap_fgetxattr,
+ .listxattr = cap_listxattr,
+ .llistxattr = cap_llistxattr,
+ .removexattr = cap_removexattr,
+ .lremovexattr = cap_lremovexattr,
+ .fremovexattr = cap_fremovexattr,
+ .setxattr = cap_setxattr,
+ .lsetxattr = cap_lsetxattr,
+ .fsetxattr = cap_fsetxattr
};
NTSTATUS vfs_cap_init(void);
NTSTATUS vfs_cap_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "cap", cap_op_tuples);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "cap",
+ &vfs_cap_fns);
}
/* For CAP functions */
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 3b691c03503..112c7457bb9 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -337,45 +337,23 @@ static int catia_chdir(vfs_handle_struct *handle,
return SMB_VFS_NEXT_CHDIR(handle, name);
}
-/* VFS operations structure */
-
-static vfs_op_tuple catia_op_tuples[] = {
-
- /* Directory operations */
-
- {SMB_VFS_OP(catia_opendir), SMB_VFS_OP_OPENDIR,
-SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_readdir), SMB_VFS_OP_READDIR,
-SMB_VFS_LAYER_TRANSPARENT},
-
- /* File operations */
-
- {SMB_VFS_OP(catia_open), SMB_VFS_OP_OPEN,
-SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_rename), SMB_VFS_OP_RENAME,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_stat), SMB_VFS_OP_STAT,
-SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_lstat), SMB_VFS_OP_LSTAT,
-SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_chmod), SMB_VFS_OP_CHMOD,
-SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_chown), SMB_VFS_OP_CHOWN,
-SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_lchown), SMB_VFS_OP_LCHOWN,
-SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(catia_chdir), SMB_VFS_OP_CHDIR,
-SMB_VFS_LAYER_TRANSPARENT},
-
- {NULL, SMB_VFS_OP_NOOP,
-SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_catia_fns = {
+ .opendir = catia_opendir,
+ .readdir = catia_readdir,
+ .open = catia_open,
+ .rename = catia_rename,
+ .stat = catia_stat,
+ .lstat = catia_lstat,
+ .unlink = catia_unlink,
+ .chmod = catia_chmod,
+ .chown = catia_chown,
+ .lchown = catia_lchown,
+ .chdir = catia_chdir,
};
NTSTATUS vfs_catia_init(void);
NTSTATUS vfs_catia_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "catia",
-catia_op_tuples);
+ &vfs_catia_fns);
}
diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c
index ccf733d09ba..b9261122036 100644
--- a/source3/modules/vfs_commit.c
+++ b/source3/modules/vfs_commit.c
@@ -294,28 +294,20 @@ static int commit_ftruncate(
return result;
}
-static vfs_op_tuple commit_ops [] =
-{
- {SMB_VFS_OP(commit_open),
- SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(commit_close),
- SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(commit_write),
- SMB_VFS_OP_WRITE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(commit_pwrite),
- SMB_VFS_OP_PWRITE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(commit_connect),
- SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(commit_ftruncate),
- SMB_VFS_OP_FTRUNCATE, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_commit_fns = {
+ .open = commit_open,
+ .close_fn = commit_close,
+ .write = commit_write,
+ .pwrite = commit_pwrite,
+ .connect_fn = commit_connect,
+ .ftruncate = commit_ftruncate
};
NTSTATUS vfs_commit_init(void);
NTSTATUS vfs_commit_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE, commit_ops);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE,
+ &vfs_commit_fns);
}
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index cdfd28c5711..a4922e7e053 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1573,270 +1573,147 @@ static int vfswrap_set_offline(struct vfs_handle_struct *handle, const char *pat
return -1;
}
-static vfs_op_tuple vfs_default_ops[] = {
-
+static struct vfs_fn_pointers vfs_default_fns = {
/* Disk operations */
- {SMB_VFS_OP(vfswrap_connect), SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_disconnect), SMB_VFS_OP_DISCONNECT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_disk_free), SMB_VFS_OP_DISK_FREE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_get_quota), SMB_VFS_OP_GET_QUOTA,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_set_quota), SMB_VFS_OP_SET_QUOTA,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_get_shadow_copy_data), SMB_VFS_OP_GET_SHADOW_COPY_DATA,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_statvfs), SMB_VFS_OP_STATVFS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
- SMB_VFS_LAYER_OPAQUE},
+ .connect_fn = vfswrap_connect,
+ .disconnect = vfswrap_disconnect,
+ .disk_free = vfswrap_disk_free,
+ .get_quota = vfswrap_get_quota,
+ .set_quota = vfswrap_set_quota,
+ .get_shadow_copy_data = vfswrap_get_shadow_copy_data,
+ .statvfs = vfswrap_statvfs,
+ .fs_capabilities = vfswrap_fs_capabilities,
/* Directory operations */
- {SMB_VFS_OP(vfswrap_opendir), SMB_VFS_OP_OPENDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_readdir), SMB_VFS_OP_READDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_seekdir), SMB_VFS_OP_SEEKDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_telldir), SMB_VFS_OP_TELLDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_rewinddir), SMB_VFS_OP_REWINDDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_mkdir), SMB_VFS_OP_MKDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_rmdir), SMB_VFS_OP_RMDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_closedir), SMB_VFS_OP_CLOSEDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_init_search_op), SMB_VFS_OP_INIT_SEARCH_OP,
- SMB_VFS_LAYER_OPAQUE},
+ .opendir = vfswrap_opendir,
+ .readdir = vfswrap_readdir,
+ .seekdir = vfswrap_seekdir,
+ .telldir = vfswrap_telldir,
+ .rewind_dir = vfswrap_rewinddir,
+ .mkdir = vfswrap_mkdir,
+ .rmdir = vfswrap_rmdir,
+ .closedir = vfswrap_closedir,
+ .init_search_op = vfswrap_init_search_op,
/* File operations */
- {SMB_VFS_OP(vfswrap_open), SMB_VFS_OP_OPEN,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_create_file), SMB_VFS_OP_CREATE_FILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_close), SMB_VFS_OP_CLOSE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_read), SMB_VFS_OP_READ,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_pread), SMB_VFS_OP_PREAD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_write), SMB_VFS_OP_WRITE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_pwrite), SMB_VFS_OP_PWRITE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_lseek), SMB_VFS_OP_LSEEK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sendfile), SMB_VFS_OP_SENDFILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_recvfile), SMB_VFS_OP_RECVFILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_rename), SMB_VFS_OP_RENAME,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fsync), SMB_VFS_OP_FSYNC,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_stat), SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fstat), SMB_VFS_OP_FSTAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_lstat), SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_get_alloc_size), SMB_VFS_OP_GET_ALLOC_SIZE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_chmod), SMB_VFS_OP_CHMOD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fchmod), SMB_VFS_OP_FCHMOD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_chown), SMB_VFS_OP_CHOWN,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fchown), SMB_VFS_OP_FCHOWN,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_lchown), SMB_VFS_OP_LCHOWN,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_chdir), SMB_VFS_OP_CHDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_getwd), SMB_VFS_OP_GETWD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_ntimes), SMB_VFS_OP_NTIMES,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_ftruncate), SMB_VFS_OP_FTRUNCATE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_lock), SMB_VFS_OP_LOCK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_kernel_flock), SMB_VFS_OP_KERNEL_FLOCK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_linux_setlease), SMB_VFS_OP_LINUX_SETLEASE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_getlock), SMB_VFS_OP_GETLOCK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_symlink), SMB_VFS_OP_SYMLINK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_readlink), SMB_VFS_OP_READLINK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_link), SMB_VFS_OP_LINK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_mknod), SMB_VFS_OP_MKNOD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_realpath), SMB_VFS_OP_REALPATH,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_notify_watch), SMB_VFS_OP_NOTIFY_WATCH,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_chflags), SMB_VFS_OP_CHFLAGS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_file_id_create), SMB_VFS_OP_FILE_ID_CREATE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_streaminfo), SMB_VFS_OP_STREAMINFO,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_get_real_filename), SMB_VFS_OP_GET_REAL_FILENAME,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_connectpath), SMB_VFS_OP_CONNECTPATH,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_brl_lock_windows), SMB_VFS_OP_BRL_LOCK_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_brl_unlock_windows),SMB_VFS_OP_BRL_UNLOCK_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_brl_cancel_windows),SMB_VFS_OP_BRL_CANCEL_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_strict_lock), SMB_VFS_OP_STRICT_LOCK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_strict_unlock), SMB_VFS_OP_STRICT_UNLOCK,
- SMB_VFS_LAYER_OPAQUE},
+ .open = vfswrap_open,
+ .create_file = vfswrap_create_file,
+ .close_fn = vfswrap_close,
+ .vfs_read = vfswrap_read,
+ .pread = vfswrap_pread,
+ .write = vfswrap_write,
+ .pwrite = vfswrap_pwrite,
+ .lseek = vfswrap_lseek,
+ .sendfile = vfswrap_sendfile,
+ .recvfile = vfswrap_recvfile,
+ .rename = vfswrap_rename,
+ .fsync = vfswrap_fsync,
+ .stat = vfswrap_stat,
+ .fstat = vfswrap_fstat,
+ .lstat = vfswrap_lstat,
+ .get_alloc_size = vfswrap_get_alloc_size,
+ .unlink = vfswrap_unlink,
+ .chmod = vfswrap_chmod,
+ .fchmod = vfswrap_fchmod,
+ .chown = vfswrap_chown,
+ .fchown = vfswrap_fchown,
+ .lchown = vfswrap_lchown,
+ .chdir = vfswrap_chdir,
+ .getwd = vfswrap_getwd,
+ .ntimes = vfswrap_ntimes,
+ .ftruncate = vfswrap_ftruncate,
+ .lock = vfswrap_lock,
+ .kernel_flock = vfswrap_kernel_flock,
+ .linux_setlease = vfswrap_linux_setlease,
+ .getlock = vfswrap_getlock,
+ .symlink = vfswrap_symlink,
+ .vfs_readlink = vfswrap_readlink,
+ .link = vfswrap_link,
+ .mknod = vfswrap_mknod,
+ .realpath = vfswrap_realpath,
+ .notify_watch = vfswrap_notify_watch,
+ .chflags = vfswrap_chflags,
+ .file_id_create = vfswrap_file_id_create,
+ .streaminfo = vfswrap_streaminfo,
+ .get_real_filename = vfswrap_get_real_filename,
+ .connectpath = vfswrap_connectpath,
+ .brl_lock_windows = vfswrap_brl_lock_windows,
+ .brl_unlock_windows = vfswrap_brl_unlock_windows,
+ .brl_cancel_windows = vfswrap_brl_cancel_windows,
+ .strict_lock = vfswrap_strict_lock,
+ .strict_unlock = vfswrap_strict_unlock,
/* NT ACL operations. */
- {SMB_VFS_OP(vfswrap_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fset_nt_acl), SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
+ .fget_nt_acl = vfswrap_fget_nt_acl,
+ .get_nt_acl = vfswrap_get_nt_acl,
+ .fset_nt_acl = vfswrap_fset_nt_acl,
/* POSIX ACL operations. */
- {SMB_VFS_OP(vfswrap_chmod_acl), SMB_VFS_OP_CHMOD_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fchmod_acl), SMB_VFS_OP_FCHMOD_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_get_entry), SMB_VFS_OP_SYS_ACL_GET_ENTRY,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_get_tag_type), SMB_VFS_OP_SYS_ACL_GET_TAG_TYPE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_get_permset), SMB_VFS_OP_SYS_ACL_GET_PERMSET,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_get_qualifier), SMB_VFS_OP_SYS_ACL_GET_QUALIFIER,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_get_file), SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_get_fd), SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_clear_perms), SMB_VFS_OP_SYS_ACL_CLEAR_PERMS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_add_perm), SMB_VFS_OP_SYS_ACL_ADD_PERM,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_to_text), SMB_VFS_OP_SYS_ACL_TO_TEXT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_init), SMB_VFS_OP_SYS_ACL_INIT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_create_entry), SMB_VFS_OP_SYS_ACL_CREATE_ENTRY,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_set_tag_type), SMB_VFS_OP_SYS_ACL_SET_TAG_TYPE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_set_qualifier), SMB_VFS_OP_SYS_ACL_SET_QUALIFIER,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_set_permset), SMB_VFS_OP_SYS_ACL_SET_PERMSET,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_valid), SMB_VFS_OP_SYS_ACL_VALID,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_set_file), SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_set_fd), SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_delete_def_file), SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_get_perm), SMB_VFS_OP_SYS_ACL_GET_PERM,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_free_text), SMB_VFS_OP_SYS_ACL_FREE_TEXT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_free_acl), SMB_VFS_OP_SYS_ACL_FREE_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_sys_acl_free_qualifier), SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER,
- SMB_VFS_LAYER_OPAQUE},
+ .chmod_acl = vfswrap_chmod_acl,
+ .fchmod_acl = vfswrap_fchmod_acl,
+
+ .sys_acl_get_entry = vfswrap_sys_acl_get_entry,
+ .sys_acl_get_tag_type = vfswrap_sys_acl_get_tag_type,
+ .sys_acl_get_permset = vfswrap_sys_acl_get_permset,
+ .sys_acl_get_qualifier = vfswrap_sys_acl_get_qualifier,
+ .sys_acl_get_file = vfswrap_sys_acl_get_file,
+ .sys_acl_get_fd = vfswrap_sys_acl_get_fd,
+ .sys_acl_clear_perms = vfswrap_sys_acl_clear_perms,
+ .sys_acl_add_perm = vfswrap_sys_acl_add_perm,
+ .sys_acl_to_text = vfswrap_sys_acl_to_text,
+ .sys_acl_init = vfswrap_sys_acl_init,
+ .sys_acl_create_entry = vfswrap_sys_acl_create_entry,
+ .sys_acl_set_tag_type = vfswrap_sys_acl_set_tag_type,
+ .sys_acl_set_qualifier = vfswrap_sys_acl_set_qualifier,
+ .sys_acl_set_permset = vfswrap_sys_acl_set_permset,
+ .sys_acl_valid = vfswrap_sys_acl_valid,
+ .sys_acl_set_file = vfswrap_sys_acl_set_file,
+ .sys_acl_set_fd = vfswrap_sys_acl_set_fd,
+ .sys_acl_delete_def_file = vfswrap_sys_acl_delete_def_file,
+ .sys_acl_get_perm = vfswrap_sys_acl_get_perm,
+ .sys_acl_free_text = vfswrap_sys_acl_free_text,
+ .sys_acl_free_acl = vfswrap_sys_acl_free_acl,
+ .sys_acl_free_qualifier = vfswrap_sys_acl_free_qualifier,
/* EA operations. */
-
- {SMB_VFS_OP(vfswrap_getxattr), SMB_VFS_OP_GETXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_lgetxattr), SMB_VFS_OP_LGETXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fgetxattr), SMB_VFS_OP_FGETXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_listxattr), SMB_VFS_OP_LISTXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_llistxattr), SMB_VFS_OP_LLISTXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_flistxattr), SMB_VFS_OP_FLISTXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_removexattr), SMB_VFS_OP_REMOVEXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_lremovexattr), SMB_VFS_OP_LREMOVEXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fremovexattr), SMB_VFS_OP_FREMOVEXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_setxattr), SMB_VFS_OP_SETXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_lsetxattr), SMB_VFS_OP_LSETXATTR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_fsetxattr), SMB_VFS_OP_FSETXATTR,
- SMB_VFS_LAYER_OPAQUE},
-
- {SMB_VFS_OP(vfswrap_aio_read), SMB_VFS_OP_AIO_READ,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_aio_write), SMB_VFS_OP_AIO_WRITE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_aio_return), SMB_VFS_OP_AIO_RETURN,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_aio_cancel), SMB_VFS_OP_AIO_CANCEL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_aio_error), SMB_VFS_OP_AIO_ERROR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_aio_fsync), SMB_VFS_OP_AIO_FSYNC,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_aio_suspend),SMB_VFS_OP_AIO_SUSPEND,
- SMB_VFS_LAYER_OPAQUE},
-
- {SMB_VFS_OP(vfswrap_aio_force), SMB_VFS_OP_AIO_FORCE,
- SMB_VFS_LAYER_OPAQUE},
-
- {SMB_VFS_OP(vfswrap_is_offline),SMB_VFS_OP_IS_OFFLINE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(vfswrap_set_offline),SMB_VFS_OP_SET_OFFLINE,
- SMB_VFS_LAYER_OPAQUE},
-
- /* Finish VFS operations definition */
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+ .getxattr = vfswrap_getxattr,
+ .lgetxattr = vfswrap_lgetxattr,
+ .fgetxattr = vfswrap_fgetxattr,
+ .listxattr = vfswrap_listxattr,
+ .llistxattr = vfswrap_llistxattr,
+ .flistxattr = vfswrap_flistxattr,
+ .removexattr = vfswrap_removexattr,
+ .lremovexattr = vfswrap_lremovexattr,
+ .fremovexattr = vfswrap_fremovexattr,
+ .setxattr = vfswrap_setxattr,
+ .lsetxattr = vfswrap_lsetxattr,
+ .fsetxattr = vfswrap_fsetxattr,
+
+ /* aio operations */
+ .aio_read = vfswrap_aio_read,
+ .aio_write = vfswrap_aio_write,
+ .aio_return_fn = vfswrap_aio_return,
+ .aio_cancel = vfswrap_aio_cancel,
+ .aio_error_fn = vfswrap_aio_error,
+ .aio_fsync = vfswrap_aio_fsync,
+ .aio_suspend = vfswrap_aio_suspend,
+ .aio_force = vfswrap_aio_force,
+
+ /* offline operations */
+ .is_offline = vfswrap_is_offline,
+ .set_offline = vfswrap_set_offline
};
NTSTATUS vfs_default_init(void);
NTSTATUS vfs_default_init(void)
{
- unsigned int needed = SMB_VFS_OP_LAST + 1; /* convert from index to count */
-
- if (ARRAY_SIZE(vfs_default_ops) != needed) {
- DEBUG(0, ("%s: %u ops registered, but %u ops are required\n",
- DEFAULT_VFS_MODULE_NAME, (unsigned int)ARRAY_SIZE(vfs_default_ops), needed));
- smb_panic("operation(s) missing from default VFS module");
- }
-
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
- DEFAULT_VFS_MODULE_NAME, vfs_default_ops);
+ DEFAULT_VFS_MODULE_NAME, &vfs_default_fns);
}
+
+
diff --git a/source3/modules/vfs_default_quota.c b/source3/modules/vfs_default_quota.c
index 6dbbad75fae..33af5bd9e9f 100644
--- a/source3/modules/vfs_default_quota.c
+++ b/source3/modules/vfs_default_quota.c
@@ -214,17 +214,14 @@ static int default_quota_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYP
return ret;
}
-/* VFS operations structure */
-
-static vfs_op_tuple default_quota_ops[] = {
- {SMB_VFS_OP(default_quota_get_quota), SMB_VFS_OP_GET_QUOTA, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(default_quota_set_quota), SMB_VFS_OP_SET_QUOTA, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_default_quota_fns = {
+ .get_quota = default_quota_get_quota,
+ .set_quota = default_quota_set_quota
};
NTSTATUS vfs_default_quota_init(void);
NTSTATUS vfs_default_quota_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, DEFAULT_QUOTA_NAME, default_quota_ops);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, DEFAULT_QUOTA_NAME,
+ &vfs_default_quota_fns);
}
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index f6fc9256d07..c2053e14e66 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -167,29 +167,16 @@ static void dirsort_rewinddir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
data->pos = 0;
}
-/* VFS operations structure */
-
-static vfs_op_tuple dirsort_op_tuples[] = {
-
- /* Directory operations */
-
- {SMB_VFS_OP(dirsort_opendir), SMB_VFS_OP_OPENDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(dirsort_readdir), SMB_VFS_OP_READDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(dirsort_seekdir), SMB_VFS_OP_SEEKDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(dirsort_telldir), SMB_VFS_OP_TELLDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(dirsort_rewinddir), SMB_VFS_OP_REWINDDIR,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {NULL, SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_dirsort_fns = {
+ .opendir = dirsort_opendir,
+ .readdir = dirsort_readdir,
+ .seekdir = dirsort_seekdir,
+ .telldir = dirsort_telldir,
+ .rewind_dir = dirsort_rewinddir,
};
NTSTATUS vfs_dirsort_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "dirsort",
- dirsort_op_tuples);
+ &vfs_dirsort_fns);
}
diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c
index 0d09d213e11..9edd0f6caf6 100644
--- a/source3/modules/vfs_expand_msdfs.c
+++ b/source3/modules/vfs_expand_msdfs.c
@@ -199,17 +199,13 @@ static int expand_msdfs_readlink(struct vfs_handle_struct *handle,
return strlen(buf);
}
-/* VFS operations structure */
-
-static vfs_op_tuple expand_msdfs_ops[] = {
- {SMB_VFS_OP(expand_msdfs_readlink), SMB_VFS_OP_READLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_expand_msdfs_fns = {
+ .vfs_readlink = expand_msdfs_readlink
};
NTSTATUS vfs_expand_msdfs_init(void);
NTSTATUS vfs_expand_msdfs_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "expand_msdfs",
- expand_msdfs_ops);
+ &vfs_expand_msdfs_fns);
}
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index c9d1862fa44..c4a20f0bddc 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -336,39 +336,26 @@ static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t
return result;
}
-/* VFS operations */
-static vfs_op_tuple audit_op_tuples[] = {
-
- /* Disk operations */
-
- {SMB_VFS_OP(audit_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_disconnect), SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_LOGGER},
-
- /* Directory operations */
-
- {SMB_VFS_OP(audit_opendir), SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_mkdir), SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_rmdir), SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_LOGGER},
-
- /* File operations */
-
- {SMB_VFS_OP(audit_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_close), SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_rename), SMB_VFS_OP_RENAME, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_chmod), SMB_VFS_OP_CHMOD, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_fchmod), SMB_VFS_OP_FCHMOD, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_chmod_acl), SMB_VFS_OP_CHMOD_ACL, SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(audit_fchmod_acl), SMB_VFS_OP_FCHMOD_ACL, SMB_VFS_LAYER_LOGGER},
-
- /* Finish VFS operations definition */
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_extd_audit_fns = {
+ .connect_fn = audit_connect,
+ .disconnect = audit_disconnect,
+ .opendir = audit_opendir,
+ .mkdir = audit_mkdir,
+ .rmdir = audit_rmdir,
+ .open = audit_open,
+ .close_fn = audit_close,
+ .rename = audit_rename,
+ .unlink = audit_unlink,
+ .chmod = audit_chmod,
+ .fchmod = audit_fchmod,
+ .chmod_acl = audit_chmod_acl,
+ .fchmod_acl = audit_fchmod_acl,
};
NTSTATUS vfs_extd_audit_init(void)
{
- NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "extd_audit", audit_op_tuples);
+ NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
+ "extd_audit", &vfs_extd_audit_fns);
if (!NT_STATUS_IS_OK(ret))
return ret;
diff --git a/source3/modules/vfs_fake_perms.c b/source3/modules/vfs_fake_perms.c
index 2740b612caa..3073a128e92 100644
--- a/source3/modules/vfs_fake_perms.c
+++ b/source3/modules/vfs_fake_perms.c
@@ -62,17 +62,14 @@ static int fake_perms_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_ST
return ret;
}
-/* VFS operations structure */
-
-static vfs_op_tuple fake_perms_ops[] = {
- {SMB_VFS_OP(fake_perms_stat), SMB_VFS_OP_STAT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(fake_perms_fstat), SMB_VFS_OP_FSTAT, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_fake_perms_fns = {
+ .stat = fake_perms_stat,
+ .fstat = fake_perms_fstat
};
NTSTATUS vfs_fake_perms_init(void);
NTSTATUS vfs_fake_perms_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fake_perms", fake_perms_ops);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fake_perms",
+ &vfs_fake_perms_fns);
}
diff --git a/source3/modules/vfs_fileid.c b/source3/modules/vfs_fileid.c
index 93b71a4dc01..133ad09cc3a 100644
--- a/source3/modules/vfs_fileid.c
+++ b/source3/modules/vfs_fileid.c
@@ -243,33 +243,10 @@ static struct file_id fileid_file_id_create(struct vfs_handle_struct *handle,
return id;
}
-static vfs_op_tuple fileid_ops[] = {
-
- /* Disk operations */
- {
- SMB_VFS_OP(fileid_connect),
- SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_TRANSPARENT
- },
- {
- SMB_VFS_OP(fileid_disconnect),
- SMB_VFS_OP_DISCONNECT,
- SMB_VFS_LAYER_TRANSPARENT
- },
-
- /* File operations */
- {
- SMB_VFS_OP(fileid_file_id_create),
- SMB_VFS_OP_FILE_ID_CREATE,
- SMB_VFS_LAYER_OPAQUE
- },
-
- /* End marker */
- {
- SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP
- }
+static struct vfs_fn_pointers vfs_fileid_fns = {
+ .connect_fn = fileid_connect,
+ .disconnect = fileid_disconnect,
+ .file_id_create = fileid_file_id_create
};
NTSTATUS vfs_fileid_init(void);
@@ -277,7 +254,8 @@ NTSTATUS vfs_fileid_init(void)
{
NTSTATUS ret;
- ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fileid", fileid_ops);
+ ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fileid",
+ &vfs_fileid_fns);
if (!NT_STATUS_IS_OK(ret)) {
return ret;
}
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 76fbc8a8aea..f57f9f011a0 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -1984,258 +1984,126 @@ static bool smb_full_audit_aio_force(struct vfs_handle_struct *handle,
return result;
}
-/* VFS operations */
-static vfs_op_tuple audit_op_tuples[] = {
+static struct vfs_fn_pointers vfs_full_audit_fns = {
/* Disk operations */
- {SMB_VFS_OP(smb_full_audit_connect), SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_disconnect), SMB_VFS_OP_DISCONNECT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_disk_free), SMB_VFS_OP_DISK_FREE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_get_quota), SMB_VFS_OP_GET_QUOTA,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_set_quota), SMB_VFS_OP_SET_QUOTA,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_get_shadow_copy_data), SMB_VFS_OP_GET_SHADOW_COPY_DATA,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_statvfs), SMB_VFS_OP_STATVFS,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
- SMB_VFS_LAYER_LOGGER},
-
- /* Directory operations */
-
- {SMB_VFS_OP(smb_full_audit_opendir), SMB_VFS_OP_OPENDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_readdir), SMB_VFS_OP_READDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_seekdir), SMB_VFS_OP_SEEKDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_telldir), SMB_VFS_OP_TELLDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_rewinddir), SMB_VFS_OP_REWINDDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_mkdir), SMB_VFS_OP_MKDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_rmdir), SMB_VFS_OP_RMDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_closedir), SMB_VFS_OP_CLOSEDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_init_search_op), SMB_VFS_OP_INIT_SEARCH_OP,
- SMB_VFS_LAYER_LOGGER},
-
- /* File operations */
-
- {SMB_VFS_OP(smb_full_audit_open), SMB_VFS_OP_OPEN,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_create_file),SMB_VFS_OP_CREATE_FILE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_close), SMB_VFS_OP_CLOSE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_read), SMB_VFS_OP_READ,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_pread), SMB_VFS_OP_PREAD,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_write), SMB_VFS_OP_WRITE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_pwrite), SMB_VFS_OP_PWRITE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_lseek), SMB_VFS_OP_LSEEK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sendfile), SMB_VFS_OP_SENDFILE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_recvfile), SMB_VFS_OP_RECVFILE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_rename), SMB_VFS_OP_RENAME,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fsync), SMB_VFS_OP_FSYNC,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_stat), SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fstat), SMB_VFS_OP_FSTAT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_lstat), SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_get_alloc_size), SMB_VFS_OP_GET_ALLOC_SIZE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_chmod), SMB_VFS_OP_CHMOD,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fchmod), SMB_VFS_OP_FCHMOD,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_chown), SMB_VFS_OP_CHOWN,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fchown), SMB_VFS_OP_FCHOWN,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_lchown), SMB_VFS_OP_LCHOWN,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_chdir), SMB_VFS_OP_CHDIR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_getwd), SMB_VFS_OP_GETWD,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_ntimes), SMB_VFS_OP_NTIMES,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_ftruncate), SMB_VFS_OP_FTRUNCATE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_lock), SMB_VFS_OP_LOCK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_kernel_flock), SMB_VFS_OP_KERNEL_FLOCK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_linux_setlease), SMB_VFS_OP_LINUX_SETLEASE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_getlock), SMB_VFS_OP_GETLOCK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_symlink), SMB_VFS_OP_SYMLINK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_readlink), SMB_VFS_OP_READLINK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_link), SMB_VFS_OP_LINK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_mknod), SMB_VFS_OP_MKNOD,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_realpath), SMB_VFS_OP_REALPATH,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_notify_watch),SMB_VFS_OP_NOTIFY_WATCH,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_chflags), SMB_VFS_OP_CHFLAGS,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_file_id_create), SMB_VFS_OP_FILE_ID_CREATE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_streaminfo), SMB_VFS_OP_STREAMINFO,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_get_real_filename), SMB_VFS_OP_GET_REAL_FILENAME,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_connectpath), SMB_VFS_OP_CONNECTPATH,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_brl_lock_windows), SMB_VFS_OP_BRL_LOCK_WINDOWS,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_brl_unlock_windows), SMB_VFS_OP_BRL_UNLOCK_WINDOWS,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_brl_cancel_windows), SMB_VFS_OP_BRL_CANCEL_WINDOWS,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_strict_lock), SMB_VFS_OP_STRICT_LOCK,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_strict_unlock), SMB_VFS_OP_STRICT_UNLOCK,
- SMB_VFS_LAYER_LOGGER},
-
- /* NT ACL operations. */
-
- {SMB_VFS_OP(smb_full_audit_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fset_nt_acl), SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_LOGGER},
-
- /* POSIX ACL operations. */
-
- {SMB_VFS_OP(smb_full_audit_chmod_acl), SMB_VFS_OP_CHMOD_ACL,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fchmod_acl), SMB_VFS_OP_FCHMOD_ACL,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_get_entry), SMB_VFS_OP_SYS_ACL_GET_ENTRY,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_get_tag_type), SMB_VFS_OP_SYS_ACL_GET_TAG_TYPE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_get_permset), SMB_VFS_OP_SYS_ACL_GET_PERMSET,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_get_qualifier), SMB_VFS_OP_SYS_ACL_GET_QUALIFIER,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_get_file), SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_get_fd), SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_clear_perms), SMB_VFS_OP_SYS_ACL_CLEAR_PERMS,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_add_perm), SMB_VFS_OP_SYS_ACL_ADD_PERM,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_to_text), SMB_VFS_OP_SYS_ACL_TO_TEXT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_init), SMB_VFS_OP_SYS_ACL_INIT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_create_entry), SMB_VFS_OP_SYS_ACL_CREATE_ENTRY,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_set_tag_type), SMB_VFS_OP_SYS_ACL_SET_TAG_TYPE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_set_qualifier), SMB_VFS_OP_SYS_ACL_SET_QUALIFIER,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_set_permset), SMB_VFS_OP_SYS_ACL_SET_PERMSET,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_valid), SMB_VFS_OP_SYS_ACL_VALID,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_set_file), SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_set_fd), SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_delete_def_file), SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_get_perm), SMB_VFS_OP_SYS_ACL_GET_PERM,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_free_text), SMB_VFS_OP_SYS_ACL_FREE_TEXT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_free_acl), SMB_VFS_OP_SYS_ACL_FREE_ACL,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_sys_acl_free_qualifier), SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER,
- SMB_VFS_LAYER_LOGGER},
-
- /* EA operations. */
-
- {SMB_VFS_OP(smb_full_audit_getxattr), SMB_VFS_OP_GETXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_lgetxattr), SMB_VFS_OP_LGETXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fgetxattr), SMB_VFS_OP_FGETXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_listxattr), SMB_VFS_OP_LISTXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_llistxattr), SMB_VFS_OP_LLISTXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_flistxattr), SMB_VFS_OP_FLISTXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_removexattr), SMB_VFS_OP_REMOVEXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_lremovexattr), SMB_VFS_OP_LREMOVEXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fremovexattr), SMB_VFS_OP_FREMOVEXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_setxattr), SMB_VFS_OP_SETXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_lsetxattr), SMB_VFS_OP_LSETXATTR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fsetxattr), SMB_VFS_OP_FSETXATTR,
- SMB_VFS_LAYER_LOGGER},
-
- {SMB_VFS_OP(smb_full_audit_aio_read), SMB_VFS_OP_AIO_READ,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_aio_write), SMB_VFS_OP_AIO_WRITE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_aio_return), SMB_VFS_OP_AIO_RETURN,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_aio_cancel), SMB_VFS_OP_AIO_CANCEL,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_aio_error), SMB_VFS_OP_AIO_ERROR,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_aio_fsync), SMB_VFS_OP_AIO_FSYNC,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_aio_suspend),SMB_VFS_OP_AIO_SUSPEND,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_aio_force),SMB_VFS_OP_AIO_FORCE,
- SMB_VFS_LAYER_LOGGER},
-
- /* Finish VFS operations definition */
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+ .connect_fn = smb_full_audit_connect,
+ .disconnect = smb_full_audit_disconnect,
+ .disk_free = smb_full_audit_disk_free,
+ .get_quota = smb_full_audit_get_quota,
+ .set_quota = smb_full_audit_set_quota,
+ .get_shadow_copy_data = smb_full_audit_get_shadow_copy_data,
+ .statvfs = smb_full_audit_statvfs,
+ .fs_capabilities = smb_full_audit_fs_capabilities,
+ .opendir = smb_full_audit_opendir,
+ .readdir = smb_full_audit_readdir,
+ .seekdir = smb_full_audit_seekdir,
+ .telldir = smb_full_audit_telldir,
+ .rewind_dir = smb_full_audit_rewinddir,
+ .mkdir = smb_full_audit_mkdir,
+ .rmdir = smb_full_audit_rmdir,
+ .closedir = smb_full_audit_closedir,
+ .init_search_op = smb_full_audit_init_search_op,
+ .open = smb_full_audit_open,
+ .create_file = smb_full_audit_create_file,
+ .close_fn = smb_full_audit_close,
+ .vfs_read = smb_full_audit_read,
+ .pread = smb_full_audit_pread,
+ .write = smb_full_audit_write,
+ .pwrite = smb_full_audit_pwrite,
+ .lseek = smb_full_audit_lseek,
+ .sendfile = smb_full_audit_sendfile,
+ .recvfile = smb_full_audit_recvfile,
+ .rename = smb_full_audit_rename,
+ .fsync = smb_full_audit_fsync,
+ .stat = smb_full_audit_stat,
+ .fstat = smb_full_audit_fstat,
+ .lstat = smb_full_audit_lstat,
+ .get_alloc_size = smb_full_audit_get_alloc_size,
+ .unlink = smb_full_audit_unlink,
+ .chmod = smb_full_audit_chmod,
+ .fchmod = smb_full_audit_fchmod,
+ .chown = smb_full_audit_chown,
+ .fchown = smb_full_audit_fchown,
+ .lchown = smb_full_audit_lchown,
+ .chdir = smb_full_audit_chdir,
+ .getwd = smb_full_audit_getwd,
+ .ntimes = smb_full_audit_ntimes,
+ .ftruncate = smb_full_audit_ftruncate,
+ .lock = smb_full_audit_lock,
+ .kernel_flock = smb_full_audit_kernel_flock,
+ .linux_setlease = smb_full_audit_linux_setlease,
+ .getlock = smb_full_audit_getlock,
+ .symlink = smb_full_audit_symlink,
+ .vfs_readlink = smb_full_audit_readlink,
+ .link = smb_full_audit_link,
+ .mknod = smb_full_audit_mknod,
+ .realpath = smb_full_audit_realpath,
+ .notify_watch = smb_full_audit_notify_watch,
+ .chflags = smb_full_audit_chflags,
+ .file_id_create = smb_full_audit_file_id_create,
+ .streaminfo = smb_full_audit_streaminfo,
+ .get_real_filename = smb_full_audit_get_real_filename,
+ .connectpath = smb_full_audit_connectpath,
+ .brl_lock_windows = smb_full_audit_brl_lock_windows,
+ .brl_unlock_windows = smb_full_audit_brl_unlock_windows,
+ .brl_cancel_windows = smb_full_audit_brl_cancel_windows,
+ .strict_lock = smb_full_audit_strict_lock,
+ .strict_unlock = smb_full_audit_strict_unlock,
+ .fget_nt_acl = smb_full_audit_fget_nt_acl,
+ .get_nt_acl = smb_full_audit_get_nt_acl,
+ .fset_nt_acl = smb_full_audit_fset_nt_acl,
+ .chmod_acl = smb_full_audit_chmod_acl,
+ .fchmod_acl = smb_full_audit_fchmod_acl,
+ .sys_acl_get_entry = smb_full_audit_sys_acl_get_entry,
+ .sys_acl_get_tag_type = smb_full_audit_sys_acl_get_tag_type,
+ .sys_acl_get_permset = smb_full_audit_sys_acl_get_permset,
+ .sys_acl_get_qualifier = smb_full_audit_sys_acl_get_qualifier,
+ .sys_acl_get_file = smb_full_audit_sys_acl_get_file,
+ .sys_acl_get_fd = smb_full_audit_sys_acl_get_fd,
+ .sys_acl_clear_perms = smb_full_audit_sys_acl_clear_perms,
+ .sys_acl_add_perm = smb_full_audit_sys_acl_add_perm,
+ .sys_acl_to_text = smb_full_audit_sys_acl_to_text,
+ .sys_acl_init = smb_full_audit_sys_acl_init,
+ .sys_acl_create_entry = smb_full_audit_sys_acl_create_entry,
+ .sys_acl_set_tag_type = smb_full_audit_sys_acl_set_tag_type,
+ .sys_acl_set_qualifier = smb_full_audit_sys_acl_set_qualifier,
+ .sys_acl_set_permset = smb_full_audit_sys_acl_set_permset,
+ .sys_acl_valid = smb_full_audit_sys_acl_valid,
+ .sys_acl_set_file = smb_full_audit_sys_acl_set_file,
+ .sys_acl_set_fd = smb_full_audit_sys_acl_set_fd,
+ .sys_acl_delete_def_file = smb_full_audit_sys_acl_delete_def_file,
+ .sys_acl_get_perm = smb_full_audit_sys_acl_get_perm,
+ .sys_acl_free_text = smb_full_audit_sys_acl_free_text,
+ .sys_acl_free_acl = smb_full_audit_sys_acl_free_acl,
+ .sys_acl_free_qualifier = smb_full_audit_sys_acl_free_qualifier,
+ .getxattr = smb_full_audit_getxattr,
+ .lgetxattr = smb_full_audit_lgetxattr,
+ .fgetxattr = smb_full_audit_fgetxattr,
+ .listxattr = smb_full_audit_listxattr,
+ .llistxattr = smb_full_audit_llistxattr,
+ .flistxattr = smb_full_audit_flistxattr,
+ .removexattr = smb_full_audit_removexattr,
+ .lremovexattr = smb_full_audit_lremovexattr,
+ .fremovexattr = smb_full_audit_fremovexattr,
+ .setxattr = smb_full_audit_setxattr,
+ .lsetxattr = smb_full_audit_lsetxattr,
+ .fsetxattr = smb_full_audit_fsetxattr,
+ .aio_read = smb_full_audit_aio_read,
+ .aio_write = smb_full_audit_aio_write,
+ .aio_return_fn = smb_full_audit_aio_return,
+ .aio_cancel = smb_full_audit_aio_cancel,
+ .aio_error_fn = smb_full_audit_aio_error,
+ .aio_fsync = smb_full_audit_aio_fsync,
+ .aio_suspend = smb_full_audit_aio_suspend,
+ .aio_force = smb_full_audit_aio_force,
};
NTSTATUS vfs_full_audit_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
- "full_audit", audit_op_tuples);
+ "full_audit", &vfs_full_audit_fns);
if (!NT_STATUS_IS_OK(ret))
return ret;
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index cde80f0021b..25eaa4b62fc 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1057,96 +1057,33 @@ static int vfs_gpfs_lstat(struct vfs_handle_struct *handle,
return 0;
}
-/* VFS operations structure */
-
-static vfs_op_tuple gpfs_op_tuples[] = {
-
- { SMB_VFS_OP(vfs_gpfs_kernel_flock),
- SMB_VFS_OP_KERNEL_FLOCK,
- SMB_VFS_LAYER_OPAQUE },
-
- { SMB_VFS_OP(vfs_gpfs_setlease),
- SMB_VFS_OP_LINUX_SETLEASE,
- SMB_VFS_LAYER_OPAQUE },
-
- { SMB_VFS_OP(vfs_gpfs_get_real_filename),
- SMB_VFS_OP_GET_REAL_FILENAME,
- SMB_VFS_LAYER_OPAQUE },
-
- { SMB_VFS_OP(gpfsacl_fget_nt_acl),
- SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_get_nt_acl),
- SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_fset_nt_acl),
- SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_chmod),
- SMB_VFS_OP_CHMOD,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_fchmod),
- SMB_VFS_OP_FCHMOD,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_close),
- SMB_VFS_OP_CLOSE,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfs_set_xattr),
- SMB_VFS_OP_SETXATTR,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfs_get_xattr),
- SMB_VFS_OP_GETXATTR,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_stat),
- SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_fstat),
- SMB_VFS_OP_FSTAT,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_lstat),
- SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP }
-
+static struct vfs_fn_pointers vfs_gpfs_fns = {
+ .kernel_flock = vfs_gpfs_kernel_flock,
+ .setlease = vfs_gpfs_setlease,
+ .get_real_filename = vfs_gpfs_get_real_filename,
+ .fget_nt_acl = gpfsacl_fget_nt_acl,
+ .get_nt_acl = gpfsacl_get_nt_acl,
+ .fset_nt_acl = gpfsacl_fset_nt_acl,
+ .sys_acl_get_file = gpfsacl_sys_acl_get_file,
+ .sys_acl_get_fd = gpfsacl_sys_acl_get_fd,
+ .sys_acl_set_file = gpfsacl_sys_acl_set_file,
+ .sys_acl_set_fd = gpfsacl_sys_acl_set_fd,
+ .sys_acl_delete_def_file = gpfsacl_sys_acl_delete_def_file,
+ .chmod = vfs_gpfs_chmod,
+ .fchmod = vfs_gpfs_fchmod,
+ .close_fn = vfs_gpfs_close,
+ .set_xattr = gpfs_set_xattr,
+ .get_xattr = gpfs_get_xattr,
+ .stat = vfs_gpfs_stat,
+ .fstat = vfs_gpfs_fstat,
+ .lstat = vfs_gpfs_lstat,
};
-
NTSTATUS vfs_gpfs_init(void);
NTSTATUS vfs_gpfs_init(void)
{
init_gpfs();
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "gpfs",
- gpfs_op_tuples);
+ &vfs_gpfs_fns);
}
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index 32e8539202d..36386365eb4 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -1150,37 +1150,18 @@ static bool hpux_acl_check(HPUX_ACL_T hpux_acl, int count)
/* VFS operations structure */
-static vfs_op_tuple hpuxacl_op_tuples[] = {
- /* Disk operations */
- {SMB_VFS_OP(hpuxacl_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(hpuxacl_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(hpuxacl_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(hpuxacl_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(hpuxacl_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers hpuxacl_fns = {
+ .sys_acl_get_file = hpuxacl_sys_acl_get_file,
+ .sys_acl_get_fd = hpuxacl_sys_acl_get_fd,
+ .sys_acl_set_file = hpuxacl_sys_acl_set_file,
+ .sys_acl_set_fd = hpuxacl_sys_acl_set_fd,
+ .sys_acl_delete_def_file = hpuxacl_sys_acl_delete_def_file,
};
NTSTATUS vfs_hpuxacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "hpuxacl",
- hpuxacl_op_tuples);
+ &hpuxacl_fns);
}
/* ENTE */
diff --git a/source3/modules/vfs_irixacl.c b/source3/modules/vfs_irixacl.c
index 6484e8f3eb9..42f82a96209 100644
--- a/source3/modules/vfs_irixacl.c
+++ b/source3/modules/vfs_irixacl.c
@@ -66,38 +66,19 @@ int irixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
/* VFS operations structure */
-static vfs_op_tuple irixacl_op_tuples[] = {
- /* Disk operations */
- {SMB_VFS_OP(irixacl_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(irixacl_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(irixacl_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(irixacl_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(irixacl_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers irixacl_fns = {
+ .sys_acl_get_file = irixacl_sys_acl_get_file,
+ .sys_acl_get_fd = irixacl_sys_acl_get_fd,
+ .sys_acl_set_file = irixacl_sys_acl_set_file,
+ .sys_acl_set_fd = irixacl_sys_acl_set_fd,
+ .sys_acl_delete_def_file = irixacl_sys_acl_delete_def_file,
};
NTSTATUS vfs_irixacl_init(void);
NTSTATUS vfs_irixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "irixacl",
- irixacl_op_tuples);
+ &irixacl_fns);
}
/* ENTE */
diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c
index 77107721743..fa9e774c1a7 100644
--- a/source3/modules/vfs_netatalk.c
+++ b/source3/modules/vfs_netatalk.c
@@ -421,28 +421,19 @@ exit_lchown:
return ret;
}
-static vfs_op_tuple atalk_ops[] = {
-
- /* Directory operations */
-
- {SMB_VFS_OP(atalk_opendir), SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(atalk_rmdir), SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_TRANSPARENT},
-
- /* File operations */
-
- {SMB_VFS_OP(atalk_rename), SMB_VFS_OP_RENAME, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(atalk_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(atalk_chmod), SMB_VFS_OP_CHMOD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(atalk_chown), SMB_VFS_OP_CHOWN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(atalk_lchown), SMB_VFS_OP_LCHOWN, SMB_VFS_LAYER_TRANSPARENT},
-
- /* Finish VFS operations definition */
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_netatalk_fns = {
+ .opendir = atalk_opendir,
+ .rmdir = atalk_rmdir,
+ .rename = atalk_rename,
+ .unlink = atalk_unlink,
+ .chmod = atalk_chmod,
+ .chown = atalk_chown,
+ .lchown = atalk_lchown,
};
NTSTATUS vfs_netatalk_init(void);
NTSTATUS vfs_netatalk_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "netatalk", atalk_ops);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "netatalk",
+ &vfs_netatalk_fns);
}
diff --git a/source3/modules/vfs_notify_fam.c b/source3/modules/vfs_notify_fam.c
index aacc52e68c0..8f00c9207f2 100644
--- a/source3/modules/vfs_notify_fam.c
+++ b/source3/modules/vfs_notify_fam.c
@@ -283,16 +283,8 @@ static NTSTATUS fam_watch(vfs_handle_struct *vfs_handle,
/* VFS operations structure */
-static vfs_op_tuple notify_fam_op_tuples[] = {
-
- {SMB_VFS_OP(fam_watch),
- SMB_VFS_OP_NOTIFY_WATCH,
- SMB_VFS_LAYER_OPAQUE},
-
- {SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
-
+static struct vfs_fn_pointers notify_fam_fns = {
+ .notify_watch = fam_watch,
};
@@ -300,5 +292,5 @@ NTSTATUS vfs_notify_fam_init(void);
NTSTATUS vfs_notify_fam_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "notify_fam",
- notify_fam_op_tuples);
+ &notify_fam_fns);
}
diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index 1a37622bea3..05f6cfdc74c 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -246,82 +246,46 @@ static uint32_t onefs_fs_capabilities(struct vfs_handle_struct *handle)
return result | SMB_VFS_NEXT_FS_CAPABILITIES(handle);
}
-static vfs_op_tuple onefs_ops[] = {
- {SMB_VFS_OP(onefs_connect), SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_opendir), SMB_VFS_OP_OPENDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_readdir), SMB_VFS_OP_READDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_seekdir), SMB_VFS_OP_SEEKDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_telldir), SMB_VFS_OP_TELLDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_rewinddir), SMB_VFS_OP_REWINDDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_mkdir), SMB_VFS_OP_MKDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_closedir), SMB_VFS_OP_CLOSEDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_init_search_op), SMB_VFS_OP_INIT_SEARCH_OP,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_open), SMB_VFS_OP_OPEN,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_create_file), SMB_VFS_OP_CREATE_FILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_close), SMB_VFS_OP_CLOSE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_sendfile), SMB_VFS_OP_SENDFILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_recvfile), SMB_VFS_OP_RECVFILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_rename), SMB_VFS_OP_RENAME,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_stat), SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_fstat), SMB_VFS_OP_FSTAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_lstat), SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_get_alloc_size), SMB_VFS_OP_GET_ALLOC_SIZE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_ntimes), SMB_VFS_OP_NTIMES,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_file_id_create), SMB_VFS_OP_FILE_ID_CREATE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_streaminfo), SMB_VFS_OP_STREAMINFO,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_brl_lock_windows), SMB_VFS_OP_BRL_LOCK_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_brl_unlock_windows), SMB_VFS_OP_BRL_UNLOCK_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_brl_cancel_windows), SMB_VFS_OP_BRL_CANCEL_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_strict_lock), SMB_VFS_OP_STRICT_LOCK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_strict_unlock), SMB_VFS_OP_STRICT_UNLOCK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_notify_watch), SMB_VFS_OP_NOTIFY_WATCH,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_fset_nt_acl), SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_statvfs), SMB_VFS_OP_STATVFS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_get_real_filename), SMB_VFS_OP_GET_REAL_FILENAME,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers onefs_fns = {
+ .connect = onefs_connect,
+ .fs_capabilities = onefs_fs_capabilities,
+ .opendir = onefs_opendir,
+ .readdir = onefs_readdir,
+ .seekdir = onefs_seekdir,
+ .telldir = onefs_telldir,
+ .rewinddir = onefs_rewinddir,
+ .mkdir = onefs_mkdir,
+ .closedir = onefs_closedir,
+ .init_search_op = onefs_init_search_op,
+ .open = onefs_open,
+ .create_file = onefs_create_file,
+ .close = onefs_close,
+ .sendfile = onefs_sendfile,
+ .recvfile = onefs_recvfile,
+ .rename = onefs_rename,
+ .stat = onefs_stat,
+ .fstat = onefs_fstat,
+ .lstat = onefs_lstat,
+ .get_alloc_size = onefs_get_alloc_size,
+ .unlink = onefs_unlink,
+ .ntimes = onefs_ntimes,
+ .file_id_create = onefs_file_id_create,
+ .streaminfo = onefs_streaminfo,
+ .brl_lock_windows = onefs_brl_lock_windows,
+ .brl_unlock_windows = onefs_brl_unlock_windows,
+ .brl_cancel_windows = onefs_brl_cancel_windows,
+ .strict_lock = onefs_strict_lock,
+ .strict_unlock = onefs_strict_unlock,
+ .notify_watch = onefs_notify_watch,
+ .fget_nt_acl = onefs_fget_nt_acl,
+ .get_nt_acl = onefs_get_nt_acl,
+ .fset_nt_acl = onefs_fset_nt_acl,
+ .statvfs = onefs_statvfs,
+ .get_real_filename = onefs_get_real_filename,
};
NTSTATUS vfs_onefs_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "onefs",
- onefs_ops);
+ &onefs_fns);
}
diff --git a/source3/modules/vfs_onefs_shadow_copy.c b/source3/modules/vfs_onefs_shadow_copy.c
index 112ef307491..b8febdc4264 100644
--- a/source3/modules/vfs_onefs_shadow_copy.c
+++ b/source3/modules/vfs_onefs_shadow_copy.c
@@ -651,111 +651,48 @@ onefs_shadow_copy_set_offline(struct vfs_handle_struct *handle,
/* VFS operations structure */
-static vfs_op_tuple onefs_shadow_copy_ops[] = {
-
- /* Disk operations */
-
- {SMB_VFS_OP(onefs_shadow_copy_disk_free), SMB_VFS_OP_DISK_FREE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_get_shadow_copy_data),
- SMB_VFS_OP_GET_SHADOW_COPY_DATA, SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_shadow_copy_statvfs), SMB_VFS_OP_STATVFS,
- SMB_VFS_LAYER_TRANSPARENT},
-
- /* Directory operations */
-
- {SMB_VFS_OP(onefs_shadow_copy_opendir), SMB_VFS_OP_OPENDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_mkdir), SMB_VFS_OP_MKDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_rmdir), SMB_VFS_OP_RMDIR,
- SMB_VFS_LAYER_TRANSPARENT},
-
- /* File operations */
-
- {SMB_VFS_OP(onefs_shadow_copy_open), SMB_VFS_OP_OPEN,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_create_file), SMB_VFS_OP_CREATE_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_rename), SMB_VFS_OP_RENAME,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_stat), SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_stat), SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_lstat), SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_chmod), SMB_VFS_OP_CHMOD,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_chown), SMB_VFS_OP_CHOWN,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_lchown), SMB_VFS_OP_LCHOWN,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_chdir), SMB_VFS_OP_CHDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_ntimes), SMB_VFS_OP_NTIMES,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_symlink), SMB_VFS_OP_SYMLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_readlink), SMB_VFS_OP_READLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_link), SMB_VFS_OP_LINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_mknod), SMB_VFS_OP_MKNOD,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_realpath), SMB_VFS_OP_REALPATH,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_chflags), SMB_VFS_OP_CHFLAGS,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_streaminfo), SMB_VFS_OP_STREAMINFO,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_get_real_filename),
- SMB_VFS_OP_GET_REAL_FILENAME, SMB_VFS_LAYER_TRANSPARENT},
-
- /* NT File ACL operations */
-
- {SMB_VFS_OP(onefs_shadow_copy_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT},
-
- /* POSIX ACL operations */
-
- {SMB_VFS_OP(onefs_shadow_copy_chmod_acl), SMB_VFS_OP_CHMOD_ACL,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, SMB_VFS_LAYER_TRANSPARENT},
-
- /* EA operations. */
-
- {SMB_VFS_OP(onefs_shadow_copy_getxattr), SMB_VFS_OP_GETXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_lgetxattr), SMB_VFS_OP_LGETXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_listxattr), SMB_VFS_OP_LISTXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_llistxattr), SMB_VFS_OP_LLISTXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_removexattr), SMB_VFS_OP_REMOVEXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_lremovexattr), SMB_VFS_OP_LREMOVEXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_setxattr), SMB_VFS_OP_SETXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_lsetxattr), SMB_VFS_OP_LSETXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
-
- /* offline operations */
- {SMB_VFS_OP(onefs_shadow_copy_is_offline), SMB_VFS_OP_IS_OFFLINE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_shadow_copy_set_offline), SMB_VFS_OP_SET_OFFLINE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers onefs_shadow_copy_fns = {
+ .disk_free = onefs_shadow_copy_disk_free,
+ .get_shadow_copy_data = onefs_shadow_copy_get_shadow_copy_data,
+ .statvfs = onefs_shadow_copy_statvfs,
+ .opendir = onefs_shadow_copy_opendir,
+ .mkdir = onefs_shadow_copy_mkdir,
+ .rmdir = onefs_shadow_copy_rmdir,
+ .open = onefs_shadow_copy_open,
+ .create_file = onefs_shadow_copy_create_file,
+ .rename = onefs_shadow_copy_rename,
+ .stat = onefs_shadow_copy_stat,
+ .stat = onefs_shadow_copy_stat,
+ .lstat = onefs_shadow_copy_lstat,
+ .unlink = onefs_shadow_copy_unlink,
+ .chmod = onefs_shadow_copy_chmod,
+ .chown = onefs_shadow_copy_chown,
+ .lchown = onefs_shadow_copy_lchown,
+ .chdir = onefs_shadow_copy_chdir,
+ .ntimes = onefs_shadow_copy_ntimes,
+ .symlink = onefs_shadow_copy_symlink,
+ .readlink = onefs_shadow_copy_readlink,
+ .link = onefs_shadow_copy_link,
+ .mknod = onefs_shadow_copy_mknod,
+ .realpath = onefs_shadow_copy_realpath,
+ .chflags = onefs_shadow_copy_chflags,
+ .streaminfo = onefs_shadow_copy_streaminfo,
+ .get_real_filename = onefs_shadow_copy_get_real_filename,
+ .get_nt_acl = onefs_shadow_copy_get_nt_acl,
+ .chmod_acl = onefs_shadow_copy_chmod_acl,
+ .sys_acl_get_file = onefs_shadow_copy_sys_acl_get_file,
+ .sys_acl_set_file = onefs_shadow_copy_sys_acl_set_file,
+ .sys_acl_delete_def_file = onefs_shadow_copy_sys_acl_delete_def_file,
+ .getxattr = onefs_shadow_copy_getxattr,
+ .lgetxattr = onefs_shadow_copy_lgetxattr,
+ .listxattr = onefs_shadow_copy_listxattr,
+ .llistxattr = onefs_shadow_copy_llistxattr,
+ .removexattr = onefs_shadow_copy_removexattr,
+ .lremovexattr = onefs_shadow_copy_lremovexattr,
+ .setxattr = onefs_shadow_copy_setxattr,
+ .lsetxattr = onefs_shadow_copy_lsetxattr,
+ .is_offline = onefs_shadow_copy_is_offline,
+ .set_offline = onefs_shadow_copy_set_offline,
};
NTSTATUS vfs_shadow_copy_init(void)
@@ -764,7 +701,7 @@ NTSTATUS vfs_shadow_copy_init(void)
ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"onefs_shadow_copy",
- onefs_shadow_copy_ops);
+ &onefs_shadow_copy_fns);
if (!NT_STATUS_IS_OK(ret))
return ret;
diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c
index 21fb2ada319..9dd25a781e9 100644
--- a/source3/modules/vfs_posixacl.c
+++ b/source3/modules/vfs_posixacl.c
@@ -361,36 +361,17 @@ static acl_t smb_acl_to_posix(const struct smb_acl_t *acl)
/* VFS operations structure */
-static vfs_op_tuple posixacl_op_tuples[] = {
- /* Disk operations */
- {SMB_VFS_OP(posixacl_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(posixacl_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(posixacl_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(posixacl_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(posixacl_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers posixacl_fns = {
+ .sys_acl_get_file = posixacl_sys_acl_get_file,
+ .sys_acl_get_fd = posixacl_sys_acl_get_fd,
+ .sys_acl_set_file = posixacl_sys_acl_set_file,
+ .sys_acl_set_fd = posixacl_sys_acl_set_fd,
+ .sys_acl_delete_def_file = posixacl_sys_acl_delete_def_file,
};
NTSTATUS vfs_posixacl_init(void);
NTSTATUS vfs_posixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "posixacl",
- posixacl_op_tuples);
+ &posixacl_fns);
}
diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c
index 2f65e94ea75..4e6e5d9d474 100644
--- a/source3/modules/vfs_prealloc.c
+++ b/source3/modules/vfs_prealloc.c
@@ -206,16 +206,15 @@ static int prealloc_ftruncate(vfs_handle_struct * handle,
return ret;
}
-static vfs_op_tuple prealloc_op_tuples[] = {
- {SMB_VFS_OP(prealloc_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(prealloc_ftruncate), SMB_VFS_OP_FTRUNCATE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(prealloc_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
- {NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers prealloc_fns = {
+ .open = prealloc_open,
+ .ftruncate = prealloc_ftruncate,
+ .connect = prealloc_connect,
};
NTSTATUS vfs_prealloc_init(void);
NTSTATUS vfs_prealloc_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
- MODULE, prealloc_op_tuples);
+ MODULE, &prealloc_fns);
}
diff --git a/source3/modules/vfs_preopen.c b/source3/modules/vfs_preopen.c
index dcc1ae18c14..e545901035b 100644
--- a/source3/modules/vfs_preopen.c
+++ b/source3/modules/vfs_preopen.c
@@ -440,18 +440,13 @@ static int preopen_open(vfs_handle_struct *handle,
return res;
}
-/* VFS operations structure */
-
-static vfs_op_tuple preopen_ops[] = {
- {SMB_VFS_OP(preopen_open), SMB_VFS_OP_OPEN,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_preopen_fns = {
+ .open = preopen_open
};
NTSTATUS vfs_preopen_init(void);
NTSTATUS vfs_preopen_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
- "preopen", preopen_ops);
+ "preopen", &vfs_preopen_fns);
}
diff --git a/source3/modules/vfs_readahead.c b/source3/modules/vfs_readahead.c
index df75814b724..124230811dd 100644
--- a/source3/modules/vfs_readahead.c
+++ b/source3/modules/vfs_readahead.c
@@ -155,18 +155,10 @@ static int readahead_connect(struct vfs_handle_struct *handle,
return SMB_VFS_NEXT_CONNECT(handle, service, user);
}
-/*******************************************************************
- Functions we're replacing.
- We don't replace read as it isn't used from smbd to read file
- data.
-*******************************************************************/
-
-static vfs_op_tuple readahead_ops [] =
-{
- {SMB_VFS_OP(readahead_sendfile), SMB_VFS_OP_SENDFILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(readahead_pread), SMB_VFS_OP_PREAD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(readahead_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_readahead_fns = {
+ .sendfile = readahead_sendfile,
+ .pread = readahead_pread,
+ .connect_fn = readahead_connect
};
/*******************************************************************
@@ -176,5 +168,6 @@ static vfs_op_tuple readahead_ops [] =
NTSTATUS vfs_readahead_init(void);
NTSTATUS vfs_readahead_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "readahead", readahead_ops);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "readahead",
+ &vfs_readahead_fns);
}
diff --git a/source3/modules/vfs_readonly.c b/source3/modules/vfs_readonly.c
index 58c83e5e1be..f7360281688 100644
--- a/source3/modules/vfs_readonly.c
+++ b/source3/modules/vfs_readonly.c
@@ -95,16 +95,13 @@ static int readonly_connect(vfs_handle_struct *handle,
}
-/* VFS operations structure */
-
-static vfs_op_tuple readonly_op_tuples[] = {
- /* Disk operations */
- {SMB_VFS_OP(readonly_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_readonly_fns = {
+ .connect_fn = readonly_connect
};
NTSTATUS vfs_readonly_init(void);
NTSTATUS vfs_readonly_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE_NAME, readonly_op_tuples);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE_NAME,
+ &vfs_readonly_fns);
}
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c
index 771189ca736..0c019dbd702 100644
--- a/source3/modules/vfs_recycle.c
+++ b/source3/modules/vfs_recycle.c
@@ -36,18 +36,6 @@ static void recycle_disconnect(vfs_handle_struct *handle);
static int recycle_unlink(vfs_handle_struct *handle,
const struct smb_filename *smb_fname);
-static vfs_op_tuple recycle_ops[] = {
-
- /* Disk operations */
- {SMB_VFS_OP(recycle_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(recycle_disconnect), SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_TRANSPARENT},
-
- /* File operations */
- {SMB_VFS_OP(recycle_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
-};
-
static int recycle_connect(vfs_handle_struct *handle, const char *service, const char *user)
{
DEBUG(10,("recycle_connect() connect to service[%s] as user[%s].\n",
@@ -665,10 +653,17 @@ done:
return rc;
}
+static struct vfs_fn_pointers vfs_recycle_fns = {
+ .connect_fn = recycle_connect,
+ .disconnect = recycle_disconnect,
+ .unlink = recycle_unlink
+};
+
NTSTATUS vfs_recycle_init(void);
NTSTATUS vfs_recycle_init(void)
{
- NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "recycle", recycle_ops);
+ NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "recycle",
+ &vfs_recycle_fns);
if (!NT_STATUS_IS_OK(ret))
return ret;
diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c
index 4f5cedb3d44..6bad1686d9a 100644
--- a/source3/modules/vfs_shadow_copy.c
+++ b/source3/modules/vfs_shadow_copy.c
@@ -118,7 +118,9 @@ static SMB_STRUCT_DIR *shadow_copy_opendir(vfs_handle_struct *handle, const char
return((SMB_STRUCT_DIR *)dirp);
}
-static SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
+static SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *_dirp,
+ SMB_STRUCT_STAT *sbuf)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
@@ -212,25 +214,21 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, files_str
return 0;
}
-/* VFS operations structure */
-
-static vfs_op_tuple shadow_copy_ops[] = {
- {SMB_VFS_OP(shadow_copy_opendir), SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy_readdir), SMB_VFS_OP_READDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy_seekdir), SMB_VFS_OP_SEEKDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy_telldir), SMB_VFS_OP_TELLDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy_rewinddir), SMB_VFS_OP_REWINDDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy_closedir), SMB_VFS_OP_CLOSEDIR, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(shadow_copy_get_shadow_copy_data), SMB_VFS_OP_GET_SHADOW_COPY_DATA,SMB_VFS_LAYER_OPAQUE},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_shadow_copy_fns = {
+ .opendir = shadow_copy_opendir,
+ .readdir = shadow_copy_readdir,
+ .seekdir = shadow_copy_seekdir,
+ .telldir = shadow_copy_telldir,
+ .rewind_dir = shadow_copy_rewinddir,
+ .closedir = shadow_copy_closedir,
+ .get_shadow_copy_data = shadow_copy_get_shadow_copy_data,
};
NTSTATUS vfs_shadow_copy_init(void);
NTSTATUS vfs_shadow_copy_init(void)
{
- NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy", shadow_copy_ops);
+ NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
+ "shadow_copy", &vfs_shadow_copy_fns);
if (!NT_STATUS_IS_OK(ret))
return ret;
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 7c338e72685..5efae3b0edc 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -600,11 +600,6 @@ static int shadow_copy2_lsetxattr(struct vfs_handle_struct *handle, const char *
static int shadow_copy2_chmod_acl(vfs_handle_struct *handle,
const char *fname, mode_t mode)
{
- /* If the underlying VFS doesn't have ACL support... */
- if (!handle->vfs_next.ops.chmod_acl) {
- errno = ENOSYS;
- return -1;
- }
SHADOW2_NEXT(CHMOD_ACL, (handle, name, mode), int, -1);
}
@@ -674,54 +669,37 @@ static int shadow_copy2_get_shadow_copy2_data(vfs_handle_struct *handle,
return 0;
}
-/* VFS operations structure */
-
-static vfs_op_tuple shadow_copy2_ops[] = {
- {SMB_VFS_OP(shadow_copy2_opendir), SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_TRANSPARENT},
-
- /* directory operations */
- {SMB_VFS_OP(shadow_copy2_mkdir), SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_rmdir), SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_TRANSPARENT},
-
- /* xattr and flags operations */
- {SMB_VFS_OP(shadow_copy2_chflags), SMB_VFS_OP_CHFLAGS, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_getxattr), SMB_VFS_OP_GETXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_lgetxattr), SMB_VFS_OP_LGETXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_listxattr), SMB_VFS_OP_LISTXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_removexattr), SMB_VFS_OP_REMOVEXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_lremovexattr),SMB_VFS_OP_LREMOVEXATTR,SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_setxattr), SMB_VFS_OP_SETXATTR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_lsetxattr), SMB_VFS_OP_LSETXATTR, SMB_VFS_LAYER_TRANSPARENT},
-
- /* File operations */
- {SMB_VFS_OP(shadow_copy2_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_rename), SMB_VFS_OP_RENAME, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_stat), SMB_VFS_OP_STAT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_lstat), SMB_VFS_OP_LSTAT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_fstat), SMB_VFS_OP_FSTAT, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_chmod), SMB_VFS_OP_CHMOD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_chown), SMB_VFS_OP_CHOWN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_chdir), SMB_VFS_OP_CHDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_ntimes), SMB_VFS_OP_NTIMES, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_symlink), SMB_VFS_OP_SYMLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_readlink), SMB_VFS_OP_READLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_link), SMB_VFS_OP_LINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_mknod), SMB_VFS_OP_MKNOD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_realpath), SMB_VFS_OP_REALPATH, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(shadow_copy2_connectpath), SMB_VFS_OP_CONNECTPATH, SMB_VFS_LAYER_OPAQUE},
-
- /* NT File ACL operations */
- {SMB_VFS_OP(shadow_copy2_get_nt_acl), SMB_VFS_OP_GET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT},
-
- /* POSIX ACL operations */
- {SMB_VFS_OP(shadow_copy2_chmod_acl), SMB_VFS_OP_CHMOD_ACL, SMB_VFS_LAYER_TRANSPARENT},
-
- /* special shadown copy op */
- {SMB_VFS_OP(shadow_copy2_get_shadow_copy2_data),
- SMB_VFS_OP_GET_SHADOW_COPY_DATA,SMB_VFS_LAYER_OPAQUE},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_shadow_copy2_fns = {
+ .opendir = shadow_copy2_opendir,
+ .mkdir = shadow_copy2_mkdir,
+ .rmdir = shadow_copy2_rmdir,
+ .chflags = shadow_copy2_chflags,
+ .getxattr = shadow_copy2_getxattr,
+ .lgetxattr = shadow_copy2_lgetxattr,
+ .listxattr = shadow_copy2_listxattr,
+ .removexattr = shadow_copy2_removexattr,
+ .lremovexattr = shadow_copy2_lremovexattr,
+ .setxattr = shadow_copy2_setxattr,
+ .lsetxattr = shadow_copy2_lsetxattr,
+ .open = shadow_copy2_open,
+ .rename = shadow_copy2_rename,
+ .stat = shadow_copy2_stat,
+ .lstat = shadow_copy2_lstat,
+ .fstat = shadow_copy2_fstat,
+ .unlink = shadow_copy2_unlink,
+ .chmod = shadow_copy2_chmod,
+ .chown = shadow_copy2_chown,
+ .chdir = shadow_copy2_chdir,
+ .ntimes = shadow_copy2_ntimes,
+ .symlink = shadow_copy2_symlink,
+ .vfs_readlink = shadow_copy2_readlink,
+ .link = shadow_copy2_link,
+ .mknod = shadow_copy2_mknod,
+ .realpath = shadow_copy2_realpath,
+ .connectpath = shadow_copy2_connectpath,
+ .get_nt_acl = shadow_copy2_get_nt_acl,
+ .chmod_acl = shadow_copy2_chmod_acl,
+ .get_shadow_copy_data = shadow_copy2_get_shadow_copy2_data,
};
NTSTATUS vfs_shadow_copy2_init(void);
@@ -729,7 +707,8 @@ NTSTATUS vfs_shadow_copy2_init(void)
{
NTSTATUS ret;
- ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy2", shadow_copy2_ops);
+ ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy2",
+ &vfs_shadow_copy2_fns);
if (!NT_STATUS_IS_OK(ret))
return ret;
diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c
index 6f7aee0e506..08389f5d90c 100644
--- a/source3/modules/vfs_smb_traffic_analyzer.c
+++ b/source3/modules/vfs_smb_traffic_analyzer.c
@@ -397,29 +397,21 @@ static ssize_t smb_traffic_analyzer_pwrite(vfs_handle_struct *handle, \
return result;
}
-/* VFS operations we use */
-
-static vfs_op_tuple smb_traffic_analyzer_tuples[] = {
-
- {SMB_VFS_OP(smb_traffic_analyzer_connect), SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_traffic_analyzer_read), SMB_VFS_OP_READ,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_traffic_analyzer_pread), SMB_VFS_OP_PREAD,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_traffic_analyzer_write), SMB_VFS_OP_WRITE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_traffic_analyzer_pwrite), SMB_VFS_OP_PWRITE,
- SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(NULL),SMB_VFS_OP_NOOP,SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_smb_traffic_analyzer_fns = {
+ .connect_fn = smb_traffic_analyzer_connect,
+ .vfs_read = smb_traffic_analyzer_read,
+ .pread = smb_traffic_analyzer_pread,
+ .write = smb_traffic_analyzer_write,
+ .pwrite = smb_traffic_analyzer_pwrite,
};
/* Module initialization */
NTSTATUS vfs_smb_traffic_analyzer_init(void)
{
- NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, \
- "smb_traffic_analyzer", smb_traffic_analyzer_tuples);
+ NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
+ "smb_traffic_analyzer",
+ &vfs_smb_traffic_analyzer_fns);
if (!NT_STATUS_IS_OK(ret)) {
return ret;
diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c
index dabb35c0c0f..6a174807b69 100644
--- a/source3/modules/vfs_solarisacl.c
+++ b/source3/modules/vfs_solarisacl.c
@@ -749,40 +749,19 @@ static bool solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count)
}
#endif
-/* VFS operations structure */
-
-static vfs_op_tuple solarisacl_op_tuples[] = {
- /* Disk operations */
- {SMB_VFS_OP(solarisacl_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(solarisacl_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(solarisacl_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(solarisacl_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(solarisacl_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers solarisacls_fns = {
+ .sys_acl_get_file = solarisacl_sys_acl_get_file,
+ .sys_acl_get_fd = solarisacl_sys_acl_get_fd,
+ .sys_acl_set_file = solarisacl_sys_acl_set_file,
+ .sys_acl_set_fd = solarisacl_sys_acl_set_fd,
+ .sys_acl_delete_def_file = solarisacl_sys_acl_delete_def_file,
};
NTSTATUS vfs_solarisacl_init(void);
NTSTATUS vfs_solarisacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "solarisacl",
- solarisacl_op_tuples);
+ &solarisacl_fns);
}
/* ENTE */
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c
index ba3b1802440..2581c7fd5b5 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -880,29 +880,19 @@ static uint32_t streams_depot_fs_capabilities(struct vfs_handle_struct *handle)
return SMB_VFS_NEXT_FS_CAPABILITIES(handle) | FILE_NAMED_STREAMS;
}
-/* VFS operations structure */
-
-static vfs_op_tuple streams_depot_ops[] = {
- {SMB_VFS_OP(streams_depot_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_depot_open), SMB_VFS_OP_OPEN,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_depot_stat), SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_depot_lstat), SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_depot_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_depot_rename), SMB_VFS_OP_RENAME,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_depot_streaminfo), SMB_VFS_OP_STREAMINFO,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_streams_depot_fns = {
+ .fs_capabilities = streams_depot_fs_capabilities,
+ .open = streams_depot_open,
+ .stat = streams_depot_stat,
+ .lstat = streams_depot_lstat,
+ .unlink = streams_depot_unlink,
+ .rename = streams_depot_rename,
+ .streaminfo = streams_depot_streaminfo,
};
NTSTATUS vfs_streams_depot_init(void);
NTSTATUS vfs_streams_depot_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "streams_depot",
- streams_depot_ops);
+ &vfs_streams_depot_fns);
}
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index c32c4f3190e..3ec38d6cc02 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -1011,37 +1011,23 @@ static int streams_xattr_ftruncate(struct vfs_handle_struct *handle,
return 0;
}
-/* VFS operations structure */
-
-static vfs_op_tuple streams_xattr_ops[] = {
- {SMB_VFS_OP(streams_xattr_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_open), SMB_VFS_OP_OPEN,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_stat), SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_fstat), SMB_VFS_OP_FSTAT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_lstat), SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_pread), SMB_VFS_OP_PREAD,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_pwrite), SMB_VFS_OP_PWRITE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_rename), SMB_VFS_OP_RENAME,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_ftruncate), SMB_VFS_OP_FTRUNCATE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(streams_xattr_streaminfo), SMB_VFS_OP_STREAMINFO,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_streams_xattr_fns = {
+ .fs_capabilities = streams_xattr_fs_capabilities,
+ .open = streams_xattr_open,
+ .stat = streams_xattr_stat,
+ .fstat = streams_xattr_fstat,
+ .lstat = streams_xattr_lstat,
+ .pread = streams_xattr_pread,
+ .pwrite = streams_xattr_pwrite,
+ .unlink = streams_xattr_unlink,
+ .rename = streams_xattr_rename,
+ .ftruncate = streams_xattr_ftruncate,
+ .streaminfo = streams_xattr_streaminfo,
};
NTSTATUS vfs_streams_xattr_init(void);
NTSTATUS vfs_streams_xattr_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "streams_xattr",
- streams_xattr_ops);
+ &vfs_streams_xattr_fns);
}
diff --git a/source3/modules/vfs_syncops.c b/source3/modules/vfs_syncops.c
index 91345e1cad8..c098159ff66 100644
--- a/source3/modules/vfs_syncops.c
+++ b/source3/modules/vfs_syncops.c
@@ -200,30 +200,24 @@ static int syncops_close(vfs_handle_struct *handle, files_struct *fsp)
}
-/* VFS operations structure */
-
-static vfs_op_tuple syncops_ops[] = {
- /* directory operations */
- {SMB_VFS_OP(syncops_mkdir), SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(syncops_rmdir), SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_TRANSPARENT},
-
- /* File operations */
- {SMB_VFS_OP(syncops_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(syncops_rename), SMB_VFS_OP_RENAME, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(syncops_unlink), SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(syncops_symlink), SMB_VFS_OP_SYMLINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(syncops_link), SMB_VFS_OP_LINK, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(syncops_mknod), SMB_VFS_OP_MKNOD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(syncops_close), SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_syncops_fns = {
+ .mkdir = syncops_mkdir,
+ .rmdir = syncops_rmdir,
+ .open = syncops_open,
+ .rename = syncops_rename,
+ .unlink = syncops_unlink,
+ .symlink = syncops_symlink,
+ .link = syncops_link,
+ .mknod = syncops_mknod,
+ .close_fn = syncops_close,
};
NTSTATUS vfs_syncops_init(void)
{
NTSTATUS ret;
- ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "syncops", syncops_ops);
+ ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "syncops",
+ &vfs_syncops_fns);
if (!NT_STATUS_IS_OK(ret))
return ret;
diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c
index b23a7ddcfab..a9788684449 100644
--- a/source3/modules/vfs_tru64acl.c
+++ b/source3/modules/vfs_tru64acl.c
@@ -466,38 +466,19 @@ static SMB_ACL_PERM_T tru64_permset_to_smb(const acl_perm_t tru64_permset)
/* VFS operations structure */
-static vfs_op_tuple tru64acl_op_tuples[] = {
- /* Disk operations */
- {SMB_VFS_OP(tru64acl_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(tru64acl_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(tru64acl_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(tru64acl_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(tru64acl_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT},
-
- {SMB_VFS_OP(NULL),
- SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers tru64acl_fns = {
+ .sys_acl_get_file = tru64acl_sys_acl_get_file,
+ .sys_acl_get_fd = tru64acl_sys_acl_get_fd,
+ .sys_acl_set_file = tru64acl_sys_acl_set_file,
+ .sys_acl_set_fd = tru64acl_sys_acl_set_fd,
+ .sys_acl_delete_def_file = tru64acl_sys_acl_delete_def_file,
};
NTSTATUS vfs_tru64acl_init(void);
NTSTATUS vfs_tru64acl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "tru64acl",
- tru64acl_op_tuples);
+ &tru64acl_fns);
}
/* ENTE */
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index 753b2bcd260..e8ae7a29b87 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -362,38 +362,21 @@ static uint32_t tsmsm_fs_capabilities(struct vfs_handle_struct *handle)
return SMB_VFS_NEXT_FS_CAPABILITIES(handle) | FILE_SUPPORTS_REMOTE_STORAGE | FILE_SUPPORTS_REPARSE_POINTS;
}
-static vfs_op_tuple vfs_tsmsm_ops[] = {
-
- /* Disk operations */
-
- {SMB_VFS_OP(tsmsm_connect), SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(tsmsm_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(tsmsm_aio_force), SMB_VFS_OP_AIO_FORCE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(tsmsm_aio_return), SMB_VFS_OP_AIO_RETURN,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(tsmsm_pread), SMB_VFS_OP_PREAD,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(tsmsm_pwrite), SMB_VFS_OP_PWRITE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(tsmsm_sendfile), SMB_VFS_OP_SENDFILE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(tsmsm_is_offline), SMB_VFS_OP_IS_OFFLINE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(tsmsm_set_offline), SMB_VFS_OP_SET_OFFLINE,
- SMB_VFS_LAYER_OPAQUE},
-
- /* Finish VFS operations definition */
-
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP,
- SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers tsmsm_fns = {
+ .connect = tsmsm_connect,
+ .fs_capabilities = tsmsm_fs_capabilities,
+ .aio_force = tsmsm_aio_force,
+ .aio_return = tsmsm_aio_return,
+ .pread = tsmsm_pread,
+ .pwrite = tsmsm_pwrite,
+ .sendfile = tsmsm_sendfile,
+ .is_offline = tsmsm_is_offline,
+ .set_offline = tsmsm_set_offline,
};
NTSTATUS vfs_tsmsm_init(void);
NTSTATUS vfs_tsmsm_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
- "tsmsm", vfs_tsmsm_ops);
+ "tsmsm", &vfs_fns);
}
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index e805fbcb2c1..a058c824e75 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -741,37 +741,23 @@ static int xattr_tdb_connect(vfs_handle_struct *handle, const char *service,
return 0;
}
-/* VFS operations structure */
-
-static const vfs_op_tuple xattr_tdb_ops[] = {
- {SMB_VFS_OP(xattr_tdb_getxattr), SMB_VFS_OP_GETXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_fgetxattr), SMB_VFS_OP_FGETXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_setxattr), SMB_VFS_OP_SETXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_fsetxattr), SMB_VFS_OP_FSETXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_listxattr), SMB_VFS_OP_LISTXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_flistxattr), SMB_VFS_OP_FLISTXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_removexattr), SMB_VFS_OP_REMOVEXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_fremovexattr), SMB_VFS_OP_FREMOVEXATTR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_rmdir), SMB_VFS_OP_RMDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(xattr_tdb_connect), SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_xattr_tdb_fns = {
+ .getxattr = xattr_tdb_getxattr,
+ .fgetxattr = xattr_tdb_fgetxattr,
+ .setxattr = xattr_tdb_setxattr,
+ .fsetxattr = xattr_tdb_fsetxattr,
+ .listxattr = xattr_tdb_listxattr,
+ .flistxattr = xattr_tdb_flistxattr,
+ .removexattr = xattr_tdb_removexattr,
+ .fremovexattr = xattr_tdb_fremovexattr,
+ .unlink = xattr_tdb_unlink,
+ .rmdir = xattr_tdb_rmdir,
+ .connect_fn = xattr_tdb_connect,
};
NTSTATUS vfs_xattr_tdb_init(void);
NTSTATUS vfs_xattr_tdb_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "xattr_tdb",
- xattr_tdb_ops);
+ &vfs_xattr_tdb_fns);
}
diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c
index a92d5dae263..312160c0267 100644
--- a/source3/modules/vfs_zfsacl.c
+++ b/source3/modules/vfs_zfsacl.c
@@ -280,37 +280,20 @@ int zfsacl_fail__sys_acl_delete_def_file(vfs_handle_struct *handle,
/* VFS operations structure */
-static vfs_op_tuple zfsacl_ops[] = {
- /* invalidate conflicting VFS methods */
- {SMB_VFS_OP(zfsacl_fail__sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(zfsacl_fail__sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(zfsacl_fail__sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(zfsacl_fail__sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(zfsacl_fail__sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_OPAQUE},
-
- /* actual methods */
- {SMB_VFS_OP(zfsacl_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(zfsacl_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(zfsacl_fset_nt_acl), SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers zfsacl_fns = {
+ .sys_acl_get_file = zfsacl_fail__sys_acl_get_file,
+ .sys_acl_get_fd = zfsacl_fail__sys_acl_get_fd,
+ .sys_acl_set_file = zfsacl_fail__sys_acl_set_file,
+ .sys_acl_set_fd = zfsacl_fail__sys_acl_set_fd,
+ .sys_acl_delete_def_file = zfsacl_fail__sys_acl_delete_def_file,
+ .fget_nt_acl = zfsacl_fget_nt_acl,
+ .get_nt_acl = zfsacl_get_nt_acl,
+ .fset_nt_acl = zfsacl_fset_nt_acl,
};
NTSTATUS vfs_zfsacl_init(void);
NTSTATUS vfs_zfsacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "zfsacl",
- zfsacl_ops);
+ &zfsacl_fns);
}
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 2d9ae2348d2..68a0c4e2342 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -32,8 +32,8 @@ static_decl_vfs;
struct vfs_init_function_entry {
char *name;
- const vfs_op_tuple *vfs_op_tuples;
struct vfs_init_function_entry *prev, *next;
+ const struct vfs_fn_pointers *fns;
};
/****************************************************************************
@@ -54,7 +54,8 @@ static struct vfs_init_function_entry *vfs_find_backend_entry(const char *name)
return NULL;
}
-NTSTATUS smb_register_vfs(int version, const char *name, const vfs_op_tuple *vfs_op_tuples)
+NTSTATUS smb_register_vfs(int version, const char *name,
+ const struct vfs_fn_pointers *fns)
{
struct vfs_init_function_entry *entry = backends;
@@ -67,7 +68,7 @@ NTSTATUS smb_register_vfs(int version, const char *name, const vfs_op_tuple *vfs
return NT_STATUS_OBJECT_TYPE_MISMATCH;
}
- if (!name || !name[0] || !vfs_op_tuples) {
+ if (!name || !name[0]) {
DEBUG(0,("smb_register_vfs() called with NULL pointer or empty name!\n"));
return NT_STATUS_INVALID_PARAMETER;
}
@@ -79,7 +80,7 @@ NTSTATUS smb_register_vfs(int version, const char *name, const vfs_op_tuple *vfs
entry = SMB_XMALLOC_P(struct vfs_init_function_entry);
entry->name = smb_xstrdup(name);
- entry->vfs_op_tuples = vfs_op_tuples;
+ entry->fns = fns;
DLIST_ADD(backends, entry);
DEBUG(5, ("Successfully added vfs backend '%s'\n", name));
@@ -100,20 +101,11 @@ static void vfs_init_default(connection_struct *conn)
initialise custom vfs hooks
****************************************************************************/
-static inline void vfs_set_operation(struct vfs_ops * vfs, vfs_op_type which,
- struct vfs_handle_struct * handle, void * op)
-{
- ((struct vfs_handle_struct **)&vfs->handles)[which] = handle;
- ((void **)(void *)&vfs->ops)[which] = op;
-}
-
bool vfs_init_custom(connection_struct *conn, const char *vfs_object)
{
- const vfs_op_tuple *ops;
char *module_path = NULL;
char *module_name = NULL;
char *module_param = NULL, *p;
- int i;
vfs_handle_struct *handle;
const struct vfs_init_function_entry *entry;
@@ -183,37 +175,19 @@ bool vfs_init_custom(connection_struct *conn, const char *vfs_object)
}
DEBUGADD(5,("Successfully loaded vfs module [%s] with the new modules system\n", vfs_object));
- if ((ops = entry->vfs_op_tuples) == NULL) {
- DEBUG(0, ("entry->vfs_op_tuples==NULL for [%s] failed\n", vfs_object));
- goto fail;
- }
handle = TALLOC_ZERO_P(conn, vfs_handle_struct);
if (!handle) {
DEBUG(0,("TALLOC_ZERO() failed!\n"));
goto fail;
}
- memcpy(&handle->vfs_next, &conn->vfs, sizeof(struct vfs_ops));
handle->conn = conn;
+ handle->fns = entry->fns;
if (module_param) {
handle->param = talloc_strdup(conn, module_param);
}
DLIST_ADD(conn->vfs_handles, handle);
- for(i=0; ops[i].op != NULL; i++) {
- DEBUG(5, ("Checking operation #%d (type %d, layer %d)\n", i, ops[i].type, ops[i].layer));
- if(ops[i].layer == SMB_VFS_LAYER_OPAQUE) {
- /* If this operation was already made opaque by different module, it
- * will be overridden here.
- */
- DEBUGADD(5, ("Making operation type %d opaque [module %s]\n", ops[i].type, vfs_object));
- vfs_set_operation(&conn->vfs_opaque, ops[i].type, handle, ops[i].op);
- }
- /* Change current VFS disposition*/
- DEBUGADD(5, ("Accepting operation type %d from module %s\n", ops[i].type, vfs_object));
- vfs_set_operation(&conn->vfs, ops[i].type, handle, ops[i].op);
- }
-
SAFE_FREE(module_path);
SAFE_FREE(module_name);
return True;
@@ -1058,3 +1032,835 @@ int vfs_lstat_smb_fname(struct connection_struct *conn, const char *fname,
return ret;
}
+/*
+ generate a file_id from a stat structure
+ */
+struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf)
+{
+ return SMB_VFS_FILE_ID_CREATE(conn, sbuf);
+}
+
+int smb_vfs_call_connect(struct vfs_handle_struct *handle,
+ const char *service, const char *user)
+{
+ VFS_FIND(connect_fn);
+ return handle->fns->connect_fn(handle, service, user);
+}
+
+void smb_vfs_call_disconnect(struct vfs_handle_struct *handle)
+{
+ VFS_FIND(disconnect);
+ return handle->fns->disconnect(handle);
+}
+
+uint64_t smb_vfs_call_disk_free(struct vfs_handle_struct *handle,
+ const char *path, bool small_query,
+ uint64_t *bsize, uint64_t *dfree,
+ uint64_t *dsize)
+{
+ VFS_FIND(disk_free);
+ return handle->fns->disk_free(handle, path, small_query, bsize, dfree,
+ dsize);
+}
+
+int smb_vfs_call_get_quota(struct vfs_handle_struct *handle,
+ enum SMB_QUOTA_TYPE qtype, unid_t id,
+ SMB_DISK_QUOTA *qt)
+{
+ VFS_FIND(get_quota);
+ return handle->fns->get_quota(handle, qtype, id, qt);
+}
+
+int smb_vfs_call_set_quota(struct vfs_handle_struct *handle,
+ enum SMB_QUOTA_TYPE qtype, unid_t id,
+ SMB_DISK_QUOTA *qt)
+{
+ VFS_FIND(set_quota);
+ return handle->fns->set_quota(handle, qtype, id, qt);
+}
+
+int smb_vfs_call_get_shadow_copy_data(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SHADOW_COPY_DATA *shadow_copy_data,
+ bool labels)
+{
+ VFS_FIND(get_shadow_copy_data);
+ return handle->fns->get_shadow_copy_data(handle, fsp, shadow_copy_data,
+ labels);
+}
+int smb_vfs_call_statvfs(struct vfs_handle_struct *handle, const char *path,
+ struct vfs_statvfs_struct *statbuf)
+{
+ VFS_FIND(statvfs);
+ return handle->fns->statvfs(handle, path, statbuf);
+}
+
+uint32_t smb_vfs_call_fs_capabilities(struct vfs_handle_struct *handle)
+{
+ VFS_FIND(fs_capabilities);
+ return handle->fns->fs_capabilities(handle);
+}
+
+SMB_STRUCT_DIR *smb_vfs_call_opendir(struct vfs_handle_struct *handle,
+ const char *fname, const char *mask,
+ uint32 attributes)
+{
+ VFS_FIND(opendir);
+ return handle->fns->opendir(handle, fname, mask, attributes);
+}
+
+SMB_STRUCT_DIRENT *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp,
+ SMB_STRUCT_STAT *sbuf)
+{
+ VFS_FIND(readdir);
+ return handle->fns->readdir(handle, dirp, sbuf);
+}
+
+void smb_vfs_call_seekdir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp, long offset)
+{
+ VFS_FIND(seekdir);
+ return handle->fns->seekdir(handle, dirp, offset);
+}
+
+long smb_vfs_call_telldir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp)
+{
+ VFS_FIND(telldir);
+ return handle->fns->telldir(handle, dirp);
+}
+
+void smb_vfs_call_rewind_dir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp)
+{
+ VFS_FIND(rewind_dir);
+ return handle->fns->rewind_dir(handle, dirp);
+}
+
+int smb_vfs_call_mkdir(struct vfs_handle_struct *handle, const char *path,
+ mode_t mode)
+{
+ VFS_FIND(mkdir);
+ return handle->fns->mkdir(handle, path, mode);
+}
+
+int smb_vfs_call_rmdir(struct vfs_handle_struct *handle, const char *path)
+{
+ VFS_FIND(rmdir);
+ return handle->fns->rmdir(handle, path);
+}
+
+int smb_vfs_call_closedir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dir)
+{
+ VFS_FIND(closedir);
+ return handle->fns->closedir(handle, dir);
+}
+
+void smb_vfs_call_init_search_op(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp)
+{
+ VFS_FIND(init_search_op);
+ return handle->fns->init_search_op(handle, dirp);
+}
+
+int smb_vfs_call_open(struct vfs_handle_struct *handle,
+ struct smb_filename *smb_fname, struct files_struct *fsp,
+ int flags, mode_t mode)
+{
+ VFS_FIND(open);
+ return handle->fns->open(handle, smb_fname, fsp, flags, mode);
+}
+
+NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle,
+ struct smb_request *req,
+ uint16_t root_dir_fid,
+ struct smb_filename *smb_fname,
+ uint32_t access_mask,
+ uint32_t share_access,
+ uint32_t create_disposition,
+ uint32_t create_options,
+ uint32_t file_attributes,
+ uint32_t oplock_request,
+ uint64_t allocation_size,
+ struct security_descriptor *sd,
+ struct ea_list *ea_list,
+ files_struct **result,
+ int *pinfo)
+{
+ VFS_FIND(create_file);
+ return handle->fns->create_file(
+ handle, req, root_dir_fid, smb_fname, access_mask,
+ share_access, create_disposition, create_options,
+ file_attributes, oplock_request, allocation_size, sd, ea_list,
+ result, pinfo);
+}
+
+int smb_vfs_call_close_fn(struct vfs_handle_struct *handle,
+ struct files_struct *fsp)
+{
+ VFS_FIND(close_fn);
+ return handle->fns->close_fn(handle, fsp);
+}
+
+ssize_t smb_vfs_call_vfs_read(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, void *data, size_t n)
+{
+ VFS_FIND(vfs_read);
+ return handle->fns->vfs_read(handle, fsp, data, n);
+}
+
+ssize_t smb_vfs_call_pread(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, void *data, size_t n,
+ SMB_OFF_T offset)
+{
+ VFS_FIND(pread);
+ return handle->fns->pread(handle, fsp, data, n, offset);
+}
+
+ssize_t smb_vfs_call_write(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const void *data,
+ size_t n)
+{
+ VFS_FIND(write);
+ return handle->fns->write(handle, fsp, data, n);
+}
+
+ssize_t smb_vfs_call_pwrite(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const void *data,
+ size_t n, SMB_OFF_T offset)
+{
+ VFS_FIND(pwrite);
+ return handle->fns->pwrite(handle, fsp, data, n, offset);
+}
+
+SMB_OFF_T smb_vfs_call_lseek(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_OFF_T offset,
+ int whence)
+{
+ VFS_FIND(lseek);
+ return handle->fns->lseek(handle, fsp, offset, whence);
+}
+
+ssize_t smb_vfs_call_sendfile(struct vfs_handle_struct *handle, int tofd,
+ files_struct *fromfsp, const DATA_BLOB *header,
+ SMB_OFF_T offset, size_t count)
+{
+ VFS_FIND(sendfile);
+ return handle->fns->sendfile(handle, tofd, fromfsp, header, offset,
+ count);
+}
+
+ssize_t smb_vfs_call_recvfile(struct vfs_handle_struct *handle, int fromfd,
+ files_struct *tofsp, SMB_OFF_T offset,
+ size_t count)
+{
+ VFS_FIND(recvfile);
+ return handle->fns->recvfile(handle, fromfd, tofsp, offset, count);
+}
+
+int smb_vfs_call_rename(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname_src,
+ const struct smb_filename *smb_fname_dst)
+{
+ VFS_FIND(rename);
+ return handle->fns->rename(handle, smb_fname_src, smb_fname_dst);
+}
+
+int smb_vfs_call_fsync(struct vfs_handle_struct *handle,
+ struct files_struct *fsp)
+{
+ VFS_FIND(fsync);
+ return handle->fns->fsync(handle, fsp);
+}
+
+int smb_vfs_call_stat(struct vfs_handle_struct *handle,
+ struct smb_filename *smb_fname)
+{
+ VFS_FIND(stat);
+ return handle->fns->stat(handle, smb_fname);
+}
+
+int smb_vfs_call_fstat(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_STRUCT_STAT *sbuf)
+{
+ VFS_FIND(fstat);
+ return handle->fns->fstat(handle, fsp, sbuf);
+}
+
+int smb_vfs_call_lstat(struct vfs_handle_struct *handle,
+ struct smb_filename *smb_filename)
+{
+ VFS_FIND(lstat);
+ return handle->fns->lstat(handle, smb_filename);
+}
+
+uint64_t smb_vfs_call_get_alloc_size(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const SMB_STRUCT_STAT *sbuf)
+{
+ VFS_FIND(get_alloc_size);
+ return handle->fns->get_alloc_size(handle, fsp, sbuf);
+}
+
+int smb_vfs_call_unlink(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname)
+{
+ VFS_FIND(unlink);
+ return handle->fns->unlink(handle, smb_fname);
+}
+
+int smb_vfs_call_chmod(struct vfs_handle_struct *handle, const char *path,
+ mode_t mode)
+{
+ VFS_FIND(chmod);
+ return handle->fns->chmod(handle, path, mode);
+}
+
+int smb_vfs_call_fchmod(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, mode_t mode)
+{
+ VFS_FIND(fchmod);
+ return handle->fns->fchmod(handle, fsp, mode);
+}
+
+int smb_vfs_call_chown(struct vfs_handle_struct *handle, const char *path,
+ uid_t uid, gid_t gid)
+{
+ VFS_FIND(chown);
+ return handle->fns->chown(handle, path, uid, gid);
+}
+
+int smb_vfs_call_fchown(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, uid_t uid, gid_t gid)
+{
+ VFS_FIND(fchown);
+ return handle->fns->fchown(handle, fsp, uid, gid);
+}
+
+int smb_vfs_call_lchown(struct vfs_handle_struct *handle, const char *path,
+ uid_t uid, gid_t gid)
+{
+ VFS_FIND(lchown);
+ return handle->fns->lchown(handle, path, uid, gid);
+}
+
+int smb_vfs_call_chdir(struct vfs_handle_struct *handle, const char *path)
+{
+ VFS_FIND(chdir);
+ return handle->fns->chdir(handle, path);
+}
+
+char *smb_vfs_call_getwd(struct vfs_handle_struct *handle, char *buf)
+{
+ VFS_FIND(getwd);
+ return handle->fns->getwd(handle, buf);
+}
+
+int smb_vfs_call_ntimes(struct vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname,
+ struct smb_file_time *ft)
+{
+ VFS_FIND(ntimes);
+ return handle->fns->ntimes(handle, smb_fname, ft);
+}
+
+int smb_vfs_call_ftruncate(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_OFF_T offset)
+{
+ VFS_FIND(ftruncate);
+ return handle->fns->ftruncate(handle, fsp, offset);
+}
+
+int smb_vfs_call_kernel_flock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, uint32 share_mode)
+{
+ VFS_FIND(kernel_flock);
+ return handle->fns->kernel_flock(handle, fsp, share_mode);
+}
+
+int smb_vfs_call_linux_setlease(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int leasetype)
+{
+ VFS_FIND(linux_setlease);
+ return handle->fns->linux_setlease(handle, fsp, leasetype);
+}
+
+int smb_vfs_call_symlink(struct vfs_handle_struct *handle, const char *oldpath,
+ const char *newpath)
+{
+ VFS_FIND(symlink);
+ return handle->fns->symlink(handle, oldpath, newpath);
+}
+
+int smb_vfs_call_vfs_readlink(struct vfs_handle_struct *handle,
+ const char *path, char *buf, size_t bufsiz)
+{
+ VFS_FIND(vfs_readlink);
+ return handle->fns->vfs_readlink(handle, path, buf, bufsiz);
+}
+
+int smb_vfs_call_link(struct vfs_handle_struct *handle, const char *oldpath,
+ const char *newpath)
+{
+ VFS_FIND(link);
+ return handle->fns->link(handle, oldpath, newpath);
+}
+
+int smb_vfs_call_mknod(struct vfs_handle_struct *handle, const char *path,
+ mode_t mode, SMB_DEV_T dev)
+{
+ VFS_FIND(mknod);
+ return handle->fns->mknod(handle, path, mode, dev);
+}
+
+char *smb_vfs_call_realpath(struct vfs_handle_struct *handle,
+ const char *path, char *resolved_path)
+{
+ VFS_FIND(realpath);
+ return handle->fns->realpath(handle, path, resolved_path);
+}
+
+NTSTATUS smb_vfs_call_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)
+{
+ VFS_FIND(notify_watch);
+ return handle->fns->notify_watch(handle, ctx, e, callback,
+ private_data, handle_p);
+}
+
+int smb_vfs_call_chflags(struct vfs_handle_struct *handle, const char *path,
+ unsigned int flags)
+{
+ VFS_FIND(chflags);
+ return handle->fns->chflags(handle, path, flags);
+}
+
+struct file_id smb_vfs_call_file_id_create(struct vfs_handle_struct *handle,
+ const SMB_STRUCT_STAT *sbuf)
+{
+ VFS_FIND(file_id_create);
+ return handle->fns->file_id_create(handle, sbuf);
+}
+
+NTSTATUS smb_vfs_call_streaminfo(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const char *fname,
+ TALLOC_CTX *mem_ctx,
+ unsigned int *num_streams,
+ struct stream_struct **streams)
+{
+ VFS_FIND(streaminfo);
+ return handle->fns->streaminfo(handle, fsp, fname, mem_ctx,
+ num_streams, streams);
+}
+
+int smb_vfs_call_get_real_filename(struct vfs_handle_struct *handle,
+ const char *path, const char *name,
+ TALLOC_CTX *mem_ctx, char **found_name)
+{
+ VFS_FIND(get_real_filename);
+ return handle->fns->get_real_filename(handle, path, name, mem_ctx,
+ found_name);
+}
+
+const char *smb_vfs_call_connectpath(struct vfs_handle_struct *handle,
+ const char *filename)
+{
+ VFS_FIND(connectpath);
+ return handle->fns->connectpath(handle, filename);
+}
+
+bool smb_vfs_call_strict_lock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ struct lock_struct *plock)
+{
+ VFS_FIND(strict_lock);
+ return handle->fns->strict_lock(handle, fsp, plock);
+}
+
+void smb_vfs_call_strict_unlock(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ struct lock_struct *plock)
+{
+ VFS_FIND(strict_unlock);
+ return handle->fns->strict_unlock(handle, fsp, plock);
+}
+
+NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32 security_info,
+ struct security_descriptor **ppdesc)
+{
+ VFS_FIND(fget_nt_acl);
+ return handle->fns->fget_nt_acl(handle, fsp, security_info,
+ ppdesc);
+}
+
+NTSTATUS smb_vfs_call_get_nt_acl(struct vfs_handle_struct *handle,
+ const char *name,
+ uint32 security_info,
+ struct security_descriptor **ppdesc)
+{
+ VFS_FIND(get_nt_acl);
+ return handle->fns->get_nt_acl(handle, name, security_info, ppdesc);
+}
+
+NTSTATUS smb_vfs_call_fset_nt_acl(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ uint32 security_info_sent,
+ const struct security_descriptor *psd)
+{
+ VFS_FIND(fset_nt_acl);
+ return handle->fns->fset_nt_acl(handle, fsp, security_info_sent, psd);
+}
+
+int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle, const char *name,
+ mode_t mode)
+{
+ VFS_FIND(chmod_acl);
+ return handle->fns->chmod_acl(handle, name, mode);
+}
+
+int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, mode_t mode)
+{
+ VFS_FIND(fchmod_acl);
+ return handle->fns->fchmod_acl(handle, fsp, mode);
+}
+
+int smb_vfs_call_sys_acl_get_entry(struct vfs_handle_struct *handle,
+ SMB_ACL_T theacl, int entry_id,
+ SMB_ACL_ENTRY_T *entry_p)
+{
+ VFS_FIND(sys_acl_get_entry);
+ return handle->fns->sys_acl_get_entry(handle, theacl, entry_id,
+ entry_p);
+}
+
+int smb_vfs_call_sys_acl_get_tag_type(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry_d,
+ SMB_ACL_TAG_T *tag_type_p)
+{
+ VFS_FIND(sys_acl_get_tag_type);
+ return handle->fns->sys_acl_get_tag_type(handle, entry_d, tag_type_p);
+}
+
+int smb_vfs_call_sys_acl_get_permset(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry_d,
+ SMB_ACL_PERMSET_T *permset_p)
+{
+ VFS_FIND(sys_acl_get_permset);
+ return handle->fns->sys_acl_get_permset(handle, entry_d, permset_p);
+}
+
+void * smb_vfs_call_sys_acl_get_qualifier(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry_d)
+{
+ VFS_FIND(sys_acl_get_qualifier);
+ return handle->fns->sys_acl_get_qualifier(handle, entry_d);
+}
+
+SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
+ const char *path_p,
+ SMB_ACL_TYPE_T type)
+{
+ VFS_FIND(sys_acl_get_file);
+ return handle->fns->sys_acl_get_file(handle, path_p, type);
+}
+
+SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
+ struct files_struct *fsp)
+{
+ VFS_FIND(sys_acl_get_fd);
+ return handle->fns->sys_acl_get_fd(handle, fsp);
+}
+
+int smb_vfs_call_sys_acl_clear_perms(struct vfs_handle_struct *handle,
+ SMB_ACL_PERMSET_T permset)
+{
+ VFS_FIND(sys_acl_clear_perms);
+ return handle->fns->sys_acl_clear_perms(handle, permset);
+}
+
+int smb_vfs_call_sys_acl_add_perm(struct vfs_handle_struct *handle,
+ SMB_ACL_PERMSET_T permset,
+ SMB_ACL_PERM_T perm)
+{
+ VFS_FIND(sys_acl_add_perm);
+ return handle->fns->sys_acl_add_perm(handle, permset, perm);
+}
+
+char * smb_vfs_call_sys_acl_to_text(struct vfs_handle_struct *handle,
+ SMB_ACL_T theacl, ssize_t *plen)
+{
+ VFS_FIND(sys_acl_to_text);
+ return handle->fns->sys_acl_to_text(handle, theacl, plen);
+}
+
+SMB_ACL_T smb_vfs_call_sys_acl_init(struct vfs_handle_struct *handle,
+ int count)
+{
+ VFS_FIND(sys_acl_init);
+ return handle->fns->sys_acl_init(handle, count);
+}
+
+int smb_vfs_call_sys_acl_create_entry(struct vfs_handle_struct *handle,
+ SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry)
+{
+ VFS_FIND(sys_acl_create_entry);
+ return handle->fns->sys_acl_create_entry(handle, pacl, pentry);
+}
+
+int smb_vfs_call_sys_acl_set_tag_type(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry,
+ SMB_ACL_TAG_T tagtype)
+{
+ VFS_FIND(sys_acl_set_tag_type);
+ return handle->fns->sys_acl_set_tag_type(handle, entry, tagtype);
+}
+
+int smb_vfs_call_sys_acl_set_qualifier(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry, void *qual)
+{
+ VFS_FIND(sys_acl_set_qualifier);
+ return handle->fns->sys_acl_set_qualifier(handle, entry, qual);
+}
+
+int smb_vfs_call_sys_acl_set_permset(struct vfs_handle_struct *handle,
+ SMB_ACL_ENTRY_T entry,
+ SMB_ACL_PERMSET_T permset)
+{
+ VFS_FIND(sys_acl_set_permset);
+ return handle->fns->sys_acl_set_permset(handle, entry, permset);
+}
+
+int smb_vfs_call_sys_acl_valid(struct vfs_handle_struct *handle,
+ SMB_ACL_T theacl)
+{
+ VFS_FIND(sys_acl_valid);
+ return handle->fns->sys_acl_valid(handle, theacl);
+}
+
+int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle,
+ const char *name, SMB_ACL_TYPE_T acltype,
+ SMB_ACL_T theacl)
+{
+ VFS_FIND(sys_acl_set_file);
+ return handle->fns->sys_acl_set_file(handle, name, acltype, theacl);
+}
+
+int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_ACL_T theacl)
+{
+ VFS_FIND(sys_acl_set_fd);
+ return handle->fns->sys_acl_set_fd(handle, fsp, theacl);
+}
+
+int smb_vfs_call_sys_acl_delete_def_file(struct vfs_handle_struct *handle,
+ const char *path)
+{
+ VFS_FIND(sys_acl_delete_def_file);
+ return handle->fns->sys_acl_delete_def_file(handle, path);
+}
+
+int smb_vfs_call_sys_acl_get_perm(struct vfs_handle_struct *handle,
+ SMB_ACL_PERMSET_T permset,
+ SMB_ACL_PERM_T perm)
+{
+ VFS_FIND(sys_acl_get_perm);
+ return handle->fns->sys_acl_get_perm(handle, permset, perm);
+}
+
+int smb_vfs_call_sys_acl_free_text(struct vfs_handle_struct *handle,
+ char *text)
+{
+ VFS_FIND(sys_acl_free_text);
+ return handle->fns->sys_acl_free_text(handle, text);
+}
+
+int smb_vfs_call_sys_acl_free_acl(struct vfs_handle_struct *handle,
+ SMB_ACL_T posix_acl)
+{
+ VFS_FIND(sys_acl_free_acl);
+ return handle->fns->sys_acl_free_acl(handle, posix_acl);
+}
+
+int smb_vfs_call_sys_acl_free_qualifier(struct vfs_handle_struct *handle,
+ void *qualifier, SMB_ACL_TAG_T tagtype)
+{
+ VFS_FIND(sys_acl_free_qualifier);
+ return handle->fns->sys_acl_free_qualifier(handle, qualifier, tagtype);
+}
+
+ssize_t smb_vfs_call_getxattr(struct vfs_handle_struct *handle,
+ const char *path, const char *name, void *value,
+ size_t size)
+{
+ VFS_FIND(getxattr);
+ return handle->fns->getxattr(handle, path, name, value, size);
+}
+
+ssize_t smb_vfs_call_lgetxattr(struct vfs_handle_struct *handle,
+ const char *path, const char *name, void *value,
+ size_t size)
+{
+ VFS_FIND(lgetxattr);
+ return handle->fns->lgetxattr(handle, path, name, value, size);
+}
+
+ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const char *name,
+ void *value, size_t size)
+{
+ VFS_FIND(fgetxattr);
+ return handle->fns->fgetxattr(handle, fsp, name, value, size);
+}
+
+ssize_t smb_vfs_call_listxattr(struct vfs_handle_struct *handle,
+ const char *path, char *list, size_t size)
+{
+ VFS_FIND(listxattr);
+ return handle->fns->listxattr(handle, path, list, size);
+}
+
+ssize_t smb_vfs_call_llistxattr(struct vfs_handle_struct *handle,
+ const char *path, char *list, size_t size)
+{
+ VFS_FIND(llistxattr);
+ return handle->fns->llistxattr(handle, path, list, size);
+}
+
+ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, char *list,
+ size_t size)
+{
+ VFS_FIND(flistxattr);
+ return handle->fns->flistxattr(handle, fsp, list, size);
+}
+
+int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
+ const char *path, const char *name)
+{
+ VFS_FIND(removexattr);
+ return handle->fns->removexattr(handle, path, name);
+}
+
+int smb_vfs_call_lremovexattr(struct vfs_handle_struct *handle,
+ const char *path, const char *name)
+{
+ VFS_FIND(lremovexattr);
+ return handle->fns->lremovexattr(handle, path, name);
+}
+
+int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const char *name)
+{
+ VFS_FIND(fremovexattr);
+ return handle->fns->fremovexattr(handle, fsp, name);
+}
+
+int smb_vfs_call_setxattr(struct vfs_handle_struct *handle, const char *path,
+ const char *name, const void *value, size_t size,
+ int flags)
+{
+ VFS_FIND(setxattr);
+ return handle->fns->setxattr(handle, path, name, value, size, flags);
+}
+
+int smb_vfs_call_lsetxattr(struct vfs_handle_struct *handle, const char *path,
+ const char *name, const void *value, size_t size,
+ int flags)
+{
+ VFS_FIND(lsetxattr);
+ return handle->fns->lsetxattr(handle, path, name, value, size, flags);
+}
+
+int smb_vfs_call_fsetxattr(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, const char *name,
+ const void *value, size_t size, int flags)
+{
+ VFS_FIND(fsetxattr);
+ return handle->fns->fsetxattr(handle, fsp, name, value, size, flags);
+}
+
+int smb_vfs_call_aio_read(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ VFS_FIND(aio_read);
+ return handle->fns->aio_read(handle, fsp, aiocb);
+}
+
+int smb_vfs_call_aio_write(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ VFS_FIND(aio_write);
+ return handle->fns->aio_write(handle, fsp, aiocb);
+}
+
+ssize_t smb_vfs_call_aio_return_fn(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_STRUCT_AIOCB *aiocb)
+{
+ VFS_FIND(aio_return_fn);
+ return handle->fns->aio_return_fn(handle, fsp, aiocb);
+}
+
+int smb_vfs_call_aio_cancel(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ VFS_FIND(aio_cancel);
+ return handle->fns->aio_cancel(handle, fsp, aiocb);
+}
+
+int smb_vfs_call_aio_error_fn(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SMB_STRUCT_AIOCB *aiocb)
+{
+ VFS_FIND(aio_error_fn);
+ return handle->fns->aio_error_fn(handle, fsp, aiocb);
+}
+
+int smb_vfs_call_aio_fsync(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, int op,
+ SMB_STRUCT_AIOCB *aiocb)
+{
+ VFS_FIND(aio_fsync);
+ return handle->fns->aio_fsync(handle, fsp, op, aiocb);
+}
+
+int smb_vfs_call_aio_suspend(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const SMB_STRUCT_AIOCB * const aiocb[], int n,
+ const struct timespec *timeout)
+{
+ VFS_FIND(aio_suspend);
+ return handle->fns->aio_suspend(handle, fsp, aiocb, n, timeout);
+}
+
+bool smb_vfs_call_aio_force(struct vfs_handle_struct *handle,
+ struct files_struct *fsp)
+{
+ VFS_FIND(aio_force);
+ return handle->fns->aio_force(handle, fsp);
+}
+
+bool smb_vfs_call_is_offline(struct vfs_handle_struct *handle,
+ const char *path, SMB_STRUCT_STAT *sbuf)
+{
+ VFS_FIND(is_offline);
+ return handle->fns->is_offline(handle, path, sbuf);
+}
+
+int smb_vfs_call_set_offline(struct vfs_handle_struct *handle,
+ const char *path)
+{
+ VFS_FIND(set_offline);
+ return handle->fns->set_offline(handle, path);
+}
diff --git a/source3/utils/net.c b/source3/utils/net.c
index f8bfab3e99d..3c33e1717f3 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -678,7 +678,6 @@ static struct functable net_func[] = {
{ 0, 0, 0, 0}
};
-
zero_sockaddr(&c->opt_dest_ip);
load_case_tables();