2 * Skeleton VFS module. Implements dummy versions of all VFS
5 * Copyright (C) Tim Potter, 1999-2000
6 * Copyright (C) Alexander Bokovoy, 2002
7 * Copyright (C) Stefan (metze) Metzmacher, 2003
8 * Copyright (C) Jeremy Allison 2009
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 #include "../source3/include/includes.h"
25 #include "lib/util/tevent_unix.h"
26 #include "lib/util/tevent_ntstatus.h"
28 /* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE
29 SAMBA DEVELOPERS GUIDE!!!!!!
32 /* If you take this file as template for your module
33 * you must re-implement every function.
36 static int skel_connect(vfs_handle_struct
*handle
, const char *service
,
43 static void skel_disconnect(vfs_handle_struct
*handle
)
48 static uint64_t skel_disk_free(vfs_handle_struct
*handle
,
49 const struct smb_filename
*smb_fname
,
60 static int skel_get_quota(vfs_handle_struct
*handle
,
61 const struct smb_filename
*smb_fname
,
62 enum SMB_QUOTA_TYPE qtype
,
70 static int skel_set_quota(vfs_handle_struct
*handle
, enum SMB_QUOTA_TYPE qtype
,
71 unid_t id
, SMB_DISK_QUOTA
*dq
)
77 static int skel_get_shadow_copy_data(vfs_handle_struct
*handle
,
79 struct shadow_copy_data
*shadow_copy_data
,
86 static int skel_statvfs(struct vfs_handle_struct
*handle
,
87 const struct smb_filename
*smb_fname
,
88 struct vfs_statvfs_struct
*statbuf
)
94 static uint32_t skel_fs_capabilities(struct vfs_handle_struct
*handle
,
95 enum timestamp_set_resolution
*p_ts_res
)
100 static NTSTATUS
skel_get_dfs_referrals(struct vfs_handle_struct
*handle
,
101 struct dfs_GetDFSReferral
*r
)
103 return NT_STATUS_NOT_IMPLEMENTED
;
106 static NTSTATUS
skel_create_dfs_pathat(struct vfs_handle_struct
*handle
,
107 struct files_struct
*dirfsp
,
108 const struct smb_filename
*smb_fname
,
109 const struct referral
*reflist
,
110 size_t referral_count
)
112 return NT_STATUS_NOT_IMPLEMENTED
;
115 static NTSTATUS
skel_read_dfs_pathat(struct vfs_handle_struct
*handle
,
117 struct files_struct
*dirfsp
,
118 const struct smb_filename
*smb_fname
,
119 struct referral
**ppreflist
,
120 size_t *preferral_count
)
122 return NT_STATUS_NOT_IMPLEMENTED
;
125 static NTSTATUS
skel_snap_check_path(struct vfs_handle_struct
*handle
,
127 const char *service_path
,
130 return NT_STATUS_NOT_SUPPORTED
;
133 static NTSTATUS
skel_snap_create(struct vfs_handle_struct
*handle
,
135 const char *base_volume
,
141 return NT_STATUS_NOT_SUPPORTED
;
144 static NTSTATUS
skel_snap_delete(struct vfs_handle_struct
*handle
,
149 return NT_STATUS_NOT_SUPPORTED
;
152 static DIR *skel_fdopendir(vfs_handle_struct
*handle
, files_struct
*fsp
,
153 const char *mask
, uint32_t attr
)
158 static struct dirent
*skel_readdir(vfs_handle_struct
*handle
,
159 DIR *dirp
, SMB_STRUCT_STAT
*sbuf
)
164 static void skel_seekdir(vfs_handle_struct
*handle
, DIR *dirp
, long offset
)
169 static long skel_telldir(vfs_handle_struct
*handle
, DIR *dirp
)
174 static void skel_rewind_dir(vfs_handle_struct
*handle
, DIR *dirp
)
179 static int skel_mkdirat(vfs_handle_struct
*handle
,
180 struct files_struct
*dirfsp
,
181 const struct smb_filename
*smb_fname
,
188 static int skel_closedir(vfs_handle_struct
*handle
, DIR *dir
)
194 static int skel_openat(struct vfs_handle_struct
*handle
,
195 const struct files_struct
*dirfsp
,
196 const struct smb_filename
*smb_fname
,
197 struct files_struct
*fsp
,
205 static NTSTATUS
skel_create_file(struct vfs_handle_struct
*handle
,
206 struct smb_request
*req
,
207 struct files_struct
**dirfsp
,
208 struct smb_filename
*smb_fname
,
209 uint32_t access_mask
,
210 uint32_t share_access
,
211 uint32_t create_disposition
,
212 uint32_t create_options
,
213 uint32_t file_attributes
,
214 uint32_t oplock_request
,
215 const struct smb2_lease
*lease
,
216 uint64_t allocation_size
,
217 uint32_t private_flags
,
218 struct security_descriptor
*sd
,
219 struct ea_list
*ea_list
,
220 files_struct
**result
, int *pinfo
,
221 const struct smb2_create_blobs
*in_context_blobs
,
222 struct smb2_create_blobs
*out_context_blobs
)
224 return NT_STATUS_NOT_IMPLEMENTED
;
227 static int skel_close_fn(vfs_handle_struct
*handle
, files_struct
*fsp
)
233 static ssize_t
skel_pread(vfs_handle_struct
*handle
, files_struct
*fsp
,
234 void *data
, size_t n
, off_t offset
)
240 static struct tevent_req
*skel_pread_send(struct vfs_handle_struct
*handle
,
242 struct tevent_context
*ev
,
243 struct files_struct
*fsp
,
244 void *data
, size_t n
, off_t offset
)
249 static ssize_t
skel_pread_recv(struct tevent_req
*req
,
250 struct vfs_aio_state
*vfs_aio_state
)
252 vfs_aio_state
->error
= ENOSYS
;
256 static ssize_t
skel_pwrite(vfs_handle_struct
*handle
, files_struct
*fsp
,
257 const void *data
, size_t n
, off_t offset
)
263 static struct tevent_req
*skel_pwrite_send(struct vfs_handle_struct
*handle
,
265 struct tevent_context
*ev
,
266 struct files_struct
*fsp
,
268 size_t n
, off_t offset
)
273 static ssize_t
skel_pwrite_recv(struct tevent_req
*req
,
274 struct vfs_aio_state
*vfs_aio_state
)
276 vfs_aio_state
->error
= ENOSYS
;
280 static off_t
skel_lseek(vfs_handle_struct
*handle
, files_struct
*fsp
,
281 off_t offset
, int whence
)
287 static ssize_t
skel_sendfile(vfs_handle_struct
*handle
, int tofd
,
288 files_struct
*fromfsp
, const DATA_BLOB
*hdr
,
289 off_t offset
, size_t n
)
295 static ssize_t
skel_recvfile(vfs_handle_struct
*handle
, int fromfd
,
296 files_struct
*tofsp
, off_t offset
, size_t n
)
302 static int skel_renameat(vfs_handle_struct
*handle
,
303 files_struct
*srcfsp
,
304 const struct smb_filename
*smb_fname_src
,
305 files_struct
*dstfsp
,
306 const struct smb_filename
*smb_fname_dst
)
312 static struct tevent_req
*skel_fsync_send(struct vfs_handle_struct
*handle
,
314 struct tevent_context
*ev
,
315 struct files_struct
*fsp
)
320 static int skel_fsync_recv(struct tevent_req
*req
,
321 struct vfs_aio_state
*vfs_aio_state
)
323 vfs_aio_state
->error
= ENOSYS
;
327 static int skel_stat(vfs_handle_struct
*handle
, struct smb_filename
*smb_fname
)
333 static int skel_fstat(vfs_handle_struct
*handle
, files_struct
*fsp
,
334 SMB_STRUCT_STAT
*sbuf
)
340 static int skel_lstat(vfs_handle_struct
*handle
,
341 struct smb_filename
*smb_fname
)
347 static uint64_t skel_get_alloc_size(struct vfs_handle_struct
*handle
,
348 struct files_struct
*fsp
,
349 const SMB_STRUCT_STAT
*sbuf
)
355 static int skel_unlinkat(vfs_handle_struct
*handle
,
356 struct files_struct
*dirfsp
,
357 const struct smb_filename
*smb_fname
,
364 static int skel_chmod(vfs_handle_struct
*handle
,
365 const struct smb_filename
*smb_fname
,
372 static int skel_fchmod(vfs_handle_struct
*handle
, files_struct
*fsp
,
379 static int skel_fchown(vfs_handle_struct
*handle
, files_struct
*fsp
,
380 uid_t uid
, gid_t gid
)
386 static int skel_lchown(vfs_handle_struct
*handle
,
387 const struct smb_filename
*smb_fname
,
395 static int skel_chdir(vfs_handle_struct
*handle
,
396 const struct smb_filename
*smb_fname
)
402 static struct smb_filename
*skel_getwd(vfs_handle_struct
*handle
,
409 static int skel_ntimes(vfs_handle_struct
*handle
,
410 const struct smb_filename
*smb_fname
,
411 struct smb_file_time
*ft
)
417 static int skel_ftruncate(vfs_handle_struct
*handle
, files_struct
*fsp
,
424 static int skel_fallocate(vfs_handle_struct
*handle
, files_struct
*fsp
,
425 uint32_t mode
, off_t offset
, off_t len
)
431 static bool skel_lock(vfs_handle_struct
*handle
, files_struct
*fsp
, int op
,
432 off_t offset
, off_t count
, int type
)
438 static int skel_kernel_flock(struct vfs_handle_struct
*handle
,
439 struct files_struct
*fsp
,
440 uint32_t share_mode
, uint32_t access_mask
)
446 static int skel_fcntl(struct vfs_handle_struct
*handle
,
447 struct files_struct
*fsp
, int cmd
, va_list cmd_arg
)
453 static int skel_linux_setlease(struct vfs_handle_struct
*handle
,
454 struct files_struct
*fsp
, int leasetype
)
460 static bool skel_getlock(vfs_handle_struct
*handle
, files_struct
*fsp
,
461 off_t
*poffset
, off_t
*pcount
, int *ptype
,
468 static int skel_symlinkat(vfs_handle_struct
*handle
,
469 const struct smb_filename
*link_contents
,
470 struct files_struct
*dirfsp
,
471 const struct smb_filename
*new_smb_fname
)
477 static int skel_vfs_readlinkat(vfs_handle_struct
*handle
,
478 files_struct
*dirfsp
,
479 const struct smb_filename
*smb_fname
,
487 static int skel_linkat(vfs_handle_struct
*handle
,
488 files_struct
*srcfsp
,
489 const struct smb_filename
*old_smb_fname
,
490 files_struct
*dstfsp
,
491 const struct smb_filename
*new_smb_fname
,
498 static int skel_mknodat(vfs_handle_struct
*handle
,
499 files_struct
*dirfsp
,
500 const struct smb_filename
*smb_fname
,
508 static struct smb_filename
*skel_realpath(vfs_handle_struct
*handle
,
510 const struct smb_filename
*smb_fname
)
516 static int skel_chflags(vfs_handle_struct
*handle
,
517 const struct smb_filename
*smb_fname
,
524 static struct file_id
skel_file_id_create(vfs_handle_struct
*handle
,
525 const SMB_STRUCT_STAT
*sbuf
)
533 static uint64_t skel_fs_file_id(vfs_handle_struct
*handle
,
534 const SMB_STRUCT_STAT
*sbuf
)
540 struct skel_offload_read_state
{
544 static struct tevent_req
*skel_offload_read_send(
546 struct tevent_context
*ev
,
547 struct vfs_handle_struct
*handle
,
548 struct files_struct
*fsp
,
554 struct tevent_req
*req
= NULL
;
555 struct skel_offload_read_state
*state
= NULL
;
557 req
= tevent_req_create(mem_ctx
, &state
, struct skel_offload_read_state
);
562 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
563 return tevent_req_post(req
, ev
);
566 static NTSTATUS
skel_offload_read_recv(struct tevent_req
*req
,
567 struct vfs_handle_struct
*handle
,
569 DATA_BLOB
*_token_blob
)
573 if (tevent_req_is_nterror(req
, &status
)) {
574 tevent_req_received(req
);
577 tevent_req_received(req
);
582 struct skel_cc_state
{
585 static struct tevent_req
*skel_offload_write_send(struct vfs_handle_struct
*handle
,
587 struct tevent_context
*ev
,
590 off_t transfer_offset
,
591 struct files_struct
*dest_fsp
,
595 struct tevent_req
*req
;
596 struct skel_cc_state
*cc_state
;
598 req
= tevent_req_create(mem_ctx
, &cc_state
, struct skel_cc_state
);
603 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
604 return tevent_req_post(req
, ev
);
607 static NTSTATUS
skel_offload_write_recv(struct vfs_handle_struct
*handle
,
608 struct tevent_req
*req
,
613 if (tevent_req_is_nterror(req
, &status
)) {
614 tevent_req_received(req
);
617 tevent_req_received(req
);
622 static NTSTATUS
skel_get_compression(struct vfs_handle_struct
*handle
,
624 struct files_struct
*fsp
,
625 struct smb_filename
*smb_fname
,
626 uint16_t *_compression_fmt
)
628 return NT_STATUS_INVALID_DEVICE_REQUEST
;
631 static NTSTATUS
skel_set_compression(struct vfs_handle_struct
*handle
,
633 struct files_struct
*fsp
,
634 uint16_t compression_fmt
)
636 return NT_STATUS_INVALID_DEVICE_REQUEST
;
639 static NTSTATUS
skel_streaminfo(struct vfs_handle_struct
*handle
,
640 struct files_struct
*fsp
,
641 const struct smb_filename
*smb_fname
,
643 unsigned int *num_streams
,
644 struct stream_struct
**streams
)
646 return NT_STATUS_NOT_IMPLEMENTED
;
649 static int skel_get_real_filename(struct vfs_handle_struct
*handle
,
650 const struct smb_filename
*path
,
652 TALLOC_CTX
*mem_ctx
, char **found_name
)
658 static const char *skel_connectpath(struct vfs_handle_struct
*handle
,
659 const struct smb_filename
*smb_fname
)
665 static NTSTATUS
skel_brl_lock_windows(struct vfs_handle_struct
*handle
,
666 struct byte_range_lock
*br_lck
,
667 struct lock_struct
*plock
)
669 return NT_STATUS_NOT_IMPLEMENTED
;
672 static bool skel_brl_unlock_windows(struct vfs_handle_struct
*handle
,
673 struct byte_range_lock
*br_lck
,
674 const struct lock_struct
*plock
)
680 static bool skel_strict_lock_check(struct vfs_handle_struct
*handle
,
681 struct files_struct
*fsp
,
682 struct lock_struct
*plock
)
688 static NTSTATUS
skel_translate_name(struct vfs_handle_struct
*handle
,
689 const char *mapped_name
,
690 enum vfs_translate_direction direction
,
691 TALLOC_CTX
*mem_ctx
, char **pmapped_name
)
693 return NT_STATUS_NOT_IMPLEMENTED
;
696 static NTSTATUS
skel_fsctl(struct vfs_handle_struct
*handle
,
697 struct files_struct
*fsp
,
700 uint16_t req_flags
, /* Needed for UNICODE ... */
701 const uint8_t *_in_data
,
704 uint32_t max_out_len
, uint32_t *out_len
)
706 return NT_STATUS_NOT_IMPLEMENTED
;
709 static NTSTATUS
skel_readdir_attr(struct vfs_handle_struct
*handle
,
710 const struct smb_filename
*fname
,
712 struct readdir_attr_data
**pattr_data
)
714 return NT_STATUS_NOT_IMPLEMENTED
;
717 static NTSTATUS
skel_get_dos_attributes(struct vfs_handle_struct
*handle
,
718 struct smb_filename
*smb_fname
,
721 return NT_STATUS_NOT_IMPLEMENTED
;
724 struct skel_get_dos_attributes_state
{
725 struct vfs_aio_state aio_state
;
729 static struct tevent_req
*skel_get_dos_attributes_send(
731 struct tevent_context
*ev
,
732 struct vfs_handle_struct
*handle
,
733 files_struct
*dir_fsp
,
734 struct smb_filename
*smb_fname
)
736 struct tevent_req
*req
= NULL
;
737 struct skel_get_dos_attributes_state
*state
= NULL
;
739 req
= tevent_req_create(mem_ctx
, &state
,
740 struct skel_get_dos_attributes_state
);
745 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
746 return tevent_req_post(req
, ev
);
749 static NTSTATUS
skel_get_dos_attributes_recv(struct tevent_req
*req
,
750 struct vfs_aio_state
*aio_state
,
753 struct skel_get_dos_attributes_state
*state
=
755 struct skel_get_dos_attributes_state
);
758 if (tevent_req_is_nterror(req
, &status
)) {
759 tevent_req_received(req
);
763 *aio_state
= state
->aio_state
;
764 *dosmode
= state
->dosmode
;
765 tevent_req_received(req
);
769 static NTSTATUS
skel_fget_dos_attributes(struct vfs_handle_struct
*handle
,
770 struct files_struct
*fsp
,
773 return NT_STATUS_NOT_IMPLEMENTED
;
776 static NTSTATUS
skel_set_dos_attributes(struct vfs_handle_struct
*handle
,
777 const struct smb_filename
*smb_fname
,
780 return NT_STATUS_NOT_IMPLEMENTED
;
783 static NTSTATUS
skel_fset_dos_attributes(struct vfs_handle_struct
*handle
,
784 struct files_struct
*fsp
,
787 return NT_STATUS_NOT_IMPLEMENTED
;
790 static NTSTATUS
skel_fget_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
791 uint32_t security_info
,
793 struct security_descriptor
**ppdesc
)
795 return NT_STATUS_NOT_IMPLEMENTED
;
798 static NTSTATUS
skel_get_nt_acl_at(vfs_handle_struct
*handle
,
799 struct files_struct
*dirfsp
,
800 const struct smb_filename
*smb_fname
,
801 uint32_t security_info
,
803 struct security_descriptor
**ppdesc
)
805 return NT_STATUS_NOT_IMPLEMENTED
;
808 static NTSTATUS
skel_fset_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
809 uint32_t security_info_sent
,
810 const struct security_descriptor
*psd
)
812 return NT_STATUS_NOT_IMPLEMENTED
;
815 static SMB_ACL_T
skel_sys_acl_get_file(vfs_handle_struct
*handle
,
816 const struct smb_filename
*smb_fname
,
821 return (SMB_ACL_T
) NULL
;
824 static SMB_ACL_T
skel_sys_acl_get_fd(vfs_handle_struct
*handle
,
825 files_struct
*fsp
, TALLOC_CTX
*mem_ctx
)
828 return (SMB_ACL_T
) NULL
;
831 static int skel_sys_acl_blob_get_file(vfs_handle_struct
*handle
,
832 const struct smb_filename
*smb_fname
,
834 char **blob_description
,
841 static int skel_sys_acl_blob_get_fd(vfs_handle_struct
*handle
,
842 files_struct
*fsp
, TALLOC_CTX
*mem_ctx
,
843 char **blob_description
, DATA_BLOB
*blob
)
849 static int skel_sys_acl_set_file(vfs_handle_struct
*handle
,
850 const struct smb_filename
*smb_fname
,
851 SMB_ACL_TYPE_T acltype
,
858 static int skel_sys_acl_set_fd(vfs_handle_struct
*handle
, files_struct
*fsp
,
865 static int skel_sys_acl_delete_def_file(vfs_handle_struct
*handle
,
866 const struct smb_filename
*smb_fname
)
872 static ssize_t
skel_getxattr(vfs_handle_struct
*handle
,
873 const struct smb_filename
*smb_fname
,
882 struct skel_getxattrat_state
{
883 struct vfs_aio_state aio_state
;
885 uint8_t *xattr_value
;
888 static struct tevent_req
*skel_getxattrat_send(
890 struct tevent_context
*ev
,
891 struct vfs_handle_struct
*handle
,
892 files_struct
*dir_fsp
,
893 const struct smb_filename
*smb_fname
,
894 const char *xattr_name
,
897 struct tevent_req
*req
= NULL
;
898 struct skel_getxattrat_state
*state
= NULL
;
900 req
= tevent_req_create(mem_ctx
, &state
,
901 struct skel_getxattrat_state
);
906 tevent_req_error(req
, ENOSYS
);
907 return tevent_req_post(req
, ev
);
910 static ssize_t
skel_getxattrat_recv(struct tevent_req
*req
,
911 struct vfs_aio_state
*aio_state
,
913 uint8_t **xattr_value
)
915 struct skel_getxattrat_state
*state
= tevent_req_data(
916 req
, struct skel_getxattrat_state
);
919 if (tevent_req_is_unix_error(req
, &aio_state
->error
)) {
920 tevent_req_received(req
);
924 *aio_state
= state
->aio_state
;
925 xattr_size
= state
->xattr_size
;
926 if (xattr_value
!= NULL
) {
927 *xattr_value
= talloc_move(mem_ctx
, &state
->xattr_value
);
930 tevent_req_received(req
);
934 static ssize_t
skel_fgetxattr(vfs_handle_struct
*handle
,
935 struct files_struct
*fsp
, const char *name
,
936 void *value
, size_t size
)
942 static ssize_t
skel_listxattr(vfs_handle_struct
*handle
,
943 const struct smb_filename
*smb_fname
,
951 static ssize_t
skel_flistxattr(vfs_handle_struct
*handle
,
952 struct files_struct
*fsp
, char *list
,
959 static int skel_removexattr(vfs_handle_struct
*handle
,
960 const struct smb_filename
*smb_fname
,
967 static int skel_fremovexattr(vfs_handle_struct
*handle
,
968 struct files_struct
*fsp
, const char *name
)
974 static int skel_setxattr(vfs_handle_struct
*handle
,
975 const struct smb_filename
*smb_fname
,
985 static int skel_fsetxattr(vfs_handle_struct
*handle
, struct files_struct
*fsp
,
986 const char *name
, const void *value
, size_t size
,
993 static bool skel_aio_force(struct vfs_handle_struct
*handle
,
994 struct files_struct
*fsp
)
1000 static NTSTATUS
skel_audit_file(struct vfs_handle_struct
*handle
,
1001 struct smb_filename
*file
,
1002 struct security_acl
*sacl
,
1003 uint32_t access_requested
,
1004 uint32_t access_denied
)
1006 return NT_STATUS_NOT_IMPLEMENTED
;
1009 static NTSTATUS
skel_durable_cookie(struct vfs_handle_struct
*handle
,
1010 struct files_struct
*fsp
,
1011 TALLOC_CTX
*mem_ctx
,
1014 return NT_STATUS_NOT_IMPLEMENTED
;
1017 static NTSTATUS
skel_durable_disconnect(struct vfs_handle_struct
*handle
,
1018 struct files_struct
*fsp
,
1019 const DATA_BLOB old_cookie
,
1020 TALLOC_CTX
*mem_ctx
,
1021 DATA_BLOB
*new_cookie
)
1023 return NT_STATUS_NOT_IMPLEMENTED
;
1026 static NTSTATUS
skel_durable_reconnect(struct vfs_handle_struct
*handle
,
1027 struct smb_request
*smb1req
,
1028 struct smbXsrv_open
*op
,
1029 const DATA_BLOB old_cookie
,
1030 TALLOC_CTX
*mem_ctx
,
1031 struct files_struct
**fsp
,
1032 DATA_BLOB
*new_cookie
)
1034 return NT_STATUS_NOT_IMPLEMENTED
;
1037 /* VFS operations structure */
1039 static struct vfs_fn_pointers skel_opaque_fns
= {
1040 /* Disk operations */
1042 .connect_fn
= skel_connect
,
1043 .disconnect_fn
= skel_disconnect
,
1044 .disk_free_fn
= skel_disk_free
,
1045 .get_quota_fn
= skel_get_quota
,
1046 .set_quota_fn
= skel_set_quota
,
1047 .get_shadow_copy_data_fn
= skel_get_shadow_copy_data
,
1048 .statvfs_fn
= skel_statvfs
,
1049 .fs_capabilities_fn
= skel_fs_capabilities
,
1050 .get_dfs_referrals_fn
= skel_get_dfs_referrals
,
1051 .create_dfs_pathat_fn
= skel_create_dfs_pathat
,
1052 .read_dfs_pathat_fn
= skel_read_dfs_pathat
,
1053 .snap_check_path_fn
= skel_snap_check_path
,
1054 .snap_create_fn
= skel_snap_create
,
1055 .snap_delete_fn
= skel_snap_delete
,
1057 /* Directory operations */
1059 .fdopendir_fn
= skel_fdopendir
,
1060 .readdir_fn
= skel_readdir
,
1061 .seekdir_fn
= skel_seekdir
,
1062 .telldir_fn
= skel_telldir
,
1063 .rewind_dir_fn
= skel_rewind_dir
,
1064 .mkdirat_fn
= skel_mkdirat
,
1065 .closedir_fn
= skel_closedir
,
1067 /* File operations */
1069 .openat_fn
= skel_openat
,
1070 .create_file_fn
= skel_create_file
,
1071 .close_fn
= skel_close_fn
,
1072 .pread_fn
= skel_pread
,
1073 .pread_send_fn
= skel_pread_send
,
1074 .pread_recv_fn
= skel_pread_recv
,
1075 .pwrite_fn
= skel_pwrite
,
1076 .pwrite_send_fn
= skel_pwrite_send
,
1077 .pwrite_recv_fn
= skel_pwrite_recv
,
1078 .lseek_fn
= skel_lseek
,
1079 .sendfile_fn
= skel_sendfile
,
1080 .recvfile_fn
= skel_recvfile
,
1081 .renameat_fn
= skel_renameat
,
1082 .fsync_send_fn
= skel_fsync_send
,
1083 .fsync_recv_fn
= skel_fsync_recv
,
1084 .stat_fn
= skel_stat
,
1085 .fstat_fn
= skel_fstat
,
1086 .lstat_fn
= skel_lstat
,
1087 .get_alloc_size_fn
= skel_get_alloc_size
,
1088 .unlinkat_fn
= skel_unlinkat
,
1089 .chmod_fn
= skel_chmod
,
1090 .fchmod_fn
= skel_fchmod
,
1091 .fchown_fn
= skel_fchown
,
1092 .lchown_fn
= skel_lchown
,
1093 .chdir_fn
= skel_chdir
,
1094 .getwd_fn
= skel_getwd
,
1095 .ntimes_fn
= skel_ntimes
,
1096 .ftruncate_fn
= skel_ftruncate
,
1097 .fallocate_fn
= skel_fallocate
,
1098 .lock_fn
= skel_lock
,
1099 .kernel_flock_fn
= skel_kernel_flock
,
1100 .fcntl_fn
= skel_fcntl
,
1101 .linux_setlease_fn
= skel_linux_setlease
,
1102 .getlock_fn
= skel_getlock
,
1103 .symlinkat_fn
= skel_symlinkat
,
1104 .readlinkat_fn
= skel_vfs_readlinkat
,
1105 .linkat_fn
= skel_linkat
,
1106 .mknodat_fn
= skel_mknodat
,
1107 .realpath_fn
= skel_realpath
,
1108 .chflags_fn
= skel_chflags
,
1109 .file_id_create_fn
= skel_file_id_create
,
1110 .fs_file_id_fn
= skel_fs_file_id
,
1111 .offload_read_send_fn
= skel_offload_read_send
,
1112 .offload_read_recv_fn
= skel_offload_read_recv
,
1113 .offload_write_send_fn
= skel_offload_write_send
,
1114 .offload_write_recv_fn
= skel_offload_write_recv
,
1115 .get_compression_fn
= skel_get_compression
,
1116 .set_compression_fn
= skel_set_compression
,
1118 .streaminfo_fn
= skel_streaminfo
,
1119 .get_real_filename_fn
= skel_get_real_filename
,
1120 .connectpath_fn
= skel_connectpath
,
1121 .brl_lock_windows_fn
= skel_brl_lock_windows
,
1122 .brl_unlock_windows_fn
= skel_brl_unlock_windows
,
1123 .strict_lock_check_fn
= skel_strict_lock_check
,
1124 .translate_name_fn
= skel_translate_name
,
1125 .fsctl_fn
= skel_fsctl
,
1126 .readdir_attr_fn
= skel_readdir_attr
,
1127 .audit_file_fn
= skel_audit_file
,
1129 /* DOS attributes. */
1130 .get_dos_attributes_fn
= skel_get_dos_attributes
,
1131 .get_dos_attributes_send_fn
= skel_get_dos_attributes_send
,
1132 .get_dos_attributes_recv_fn
= skel_get_dos_attributes_recv
,
1133 .fget_dos_attributes_fn
= skel_fget_dos_attributes
,
1134 .set_dos_attributes_fn
= skel_set_dos_attributes
,
1135 .fset_dos_attributes_fn
= skel_fset_dos_attributes
,
1137 /* NT ACL operations. */
1139 .fget_nt_acl_fn
= skel_fget_nt_acl
,
1140 .get_nt_acl_at_fn
= skel_get_nt_acl_at
,
1141 .fset_nt_acl_fn
= skel_fset_nt_acl
,
1143 /* POSIX ACL operations. */
1145 .sys_acl_get_file_fn
= skel_sys_acl_get_file
,
1146 .sys_acl_get_fd_fn
= skel_sys_acl_get_fd
,
1147 .sys_acl_blob_get_file_fn
= skel_sys_acl_blob_get_file
,
1148 .sys_acl_blob_get_fd_fn
= skel_sys_acl_blob_get_fd
,
1149 .sys_acl_set_file_fn
= skel_sys_acl_set_file
,
1150 .sys_acl_set_fd_fn
= skel_sys_acl_set_fd
,
1151 .sys_acl_delete_def_file_fn
= skel_sys_acl_delete_def_file
,
1153 /* EA operations. */
1154 .getxattr_fn
= skel_getxattr
,
1155 .getxattrat_send_fn
= skel_getxattrat_send
,
1156 .getxattrat_recv_fn
= skel_getxattrat_recv
,
1157 .fgetxattr_fn
= skel_fgetxattr
,
1158 .listxattr_fn
= skel_listxattr
,
1159 .flistxattr_fn
= skel_flistxattr
,
1160 .removexattr_fn
= skel_removexattr
,
1161 .fremovexattr_fn
= skel_fremovexattr
,
1162 .setxattr_fn
= skel_setxattr
,
1163 .fsetxattr_fn
= skel_fsetxattr
,
1165 /* aio operations */
1166 .aio_force_fn
= skel_aio_force
,
1168 /* durable handle operations */
1169 .durable_cookie_fn
= skel_durable_cookie
,
1170 .durable_disconnect_fn
= skel_durable_disconnect
,
1171 .durable_reconnect_fn
= skel_durable_reconnect
,
1175 NTSTATUS
vfs_skel_opaque_init(TALLOC_CTX
*ctx
)
1178 * smb_vfs_assert_all_fns() makes sure every
1179 * call is implemented.
1181 * An opaque module requires this!
1183 smb_vfs_assert_all_fns(&skel_opaque_fns
, "skel_opaque");
1184 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION
, "skel_opaque",