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 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 smb_filename
*smb_fname
,
208 uint32_t access_mask
,
209 uint32_t share_access
,
210 uint32_t create_disposition
,
211 uint32_t create_options
,
212 uint32_t file_attributes
,
213 uint32_t oplock_request
,
214 const struct smb2_lease
*lease
,
215 uint64_t allocation_size
,
216 uint32_t private_flags
,
217 struct security_descriptor
*sd
,
218 struct ea_list
*ea_list
,
219 files_struct
**result
, int *pinfo
,
220 const struct smb2_create_blobs
*in_context_blobs
,
221 struct smb2_create_blobs
*out_context_blobs
)
223 return NT_STATUS_NOT_IMPLEMENTED
;
226 static int skel_close_fn(vfs_handle_struct
*handle
, files_struct
*fsp
)
232 static ssize_t
skel_pread(vfs_handle_struct
*handle
, files_struct
*fsp
,
233 void *data
, size_t n
, off_t offset
)
239 static struct tevent_req
*skel_pread_send(struct vfs_handle_struct
*handle
,
241 struct tevent_context
*ev
,
242 struct files_struct
*fsp
,
243 void *data
, size_t n
, off_t offset
)
248 static ssize_t
skel_pread_recv(struct tevent_req
*req
,
249 struct vfs_aio_state
*vfs_aio_state
)
251 vfs_aio_state
->error
= ENOSYS
;
255 static ssize_t
skel_pwrite(vfs_handle_struct
*handle
, files_struct
*fsp
,
256 const void *data
, size_t n
, off_t offset
)
262 static struct tevent_req
*skel_pwrite_send(struct vfs_handle_struct
*handle
,
264 struct tevent_context
*ev
,
265 struct files_struct
*fsp
,
267 size_t n
, off_t offset
)
272 static ssize_t
skel_pwrite_recv(struct tevent_req
*req
,
273 struct vfs_aio_state
*vfs_aio_state
)
275 vfs_aio_state
->error
= ENOSYS
;
279 static off_t
skel_lseek(vfs_handle_struct
*handle
, files_struct
*fsp
,
280 off_t offset
, int whence
)
286 static ssize_t
skel_sendfile(vfs_handle_struct
*handle
, int tofd
,
287 files_struct
*fromfsp
, const DATA_BLOB
*hdr
,
288 off_t offset
, size_t n
)
294 static ssize_t
skel_recvfile(vfs_handle_struct
*handle
, int fromfd
,
295 files_struct
*tofsp
, off_t offset
, size_t n
)
301 static int skel_renameat(vfs_handle_struct
*handle
,
302 files_struct
*srcfsp
,
303 const struct smb_filename
*smb_fname_src
,
304 files_struct
*dstfsp
,
305 const struct smb_filename
*smb_fname_dst
)
311 static struct tevent_req
*skel_fsync_send(struct vfs_handle_struct
*handle
,
313 struct tevent_context
*ev
,
314 struct files_struct
*fsp
)
319 static int skel_fsync_recv(struct tevent_req
*req
,
320 struct vfs_aio_state
*vfs_aio_state
)
322 vfs_aio_state
->error
= ENOSYS
;
326 static int skel_stat(vfs_handle_struct
*handle
, struct smb_filename
*smb_fname
)
332 static int skel_fstat(vfs_handle_struct
*handle
, files_struct
*fsp
,
333 SMB_STRUCT_STAT
*sbuf
)
339 static int skel_lstat(vfs_handle_struct
*handle
,
340 struct smb_filename
*smb_fname
)
346 static uint64_t skel_get_alloc_size(struct vfs_handle_struct
*handle
,
347 struct files_struct
*fsp
,
348 const SMB_STRUCT_STAT
*sbuf
)
354 static int skel_unlinkat(vfs_handle_struct
*handle
,
355 struct files_struct
*dirfsp
,
356 const struct smb_filename
*smb_fname
,
363 static int skel_chmod(vfs_handle_struct
*handle
,
364 const struct smb_filename
*smb_fname
,
371 static int skel_fchmod(vfs_handle_struct
*handle
, files_struct
*fsp
,
378 static int skel_fchown(vfs_handle_struct
*handle
, files_struct
*fsp
,
379 uid_t uid
, gid_t gid
)
385 static int skel_lchown(vfs_handle_struct
*handle
,
386 const struct smb_filename
*smb_fname
,
394 static int skel_chdir(vfs_handle_struct
*handle
,
395 const struct smb_filename
*smb_fname
)
401 static struct smb_filename
*skel_getwd(vfs_handle_struct
*handle
,
408 static int skel_ntimes(vfs_handle_struct
*handle
,
409 const struct smb_filename
*smb_fname
,
410 struct smb_file_time
*ft
)
416 static int skel_ftruncate(vfs_handle_struct
*handle
, files_struct
*fsp
,
423 static int skel_fallocate(vfs_handle_struct
*handle
, files_struct
*fsp
,
424 uint32_t mode
, off_t offset
, off_t len
)
430 static bool skel_lock(vfs_handle_struct
*handle
, files_struct
*fsp
, int op
,
431 off_t offset
, off_t count
, int type
)
437 static int skel_kernel_flock(struct vfs_handle_struct
*handle
,
438 struct files_struct
*fsp
,
439 uint32_t share_mode
, uint32_t access_mask
)
445 static int skel_fcntl(struct vfs_handle_struct
*handle
,
446 struct files_struct
*fsp
, int cmd
, va_list cmd_arg
)
452 static int skel_linux_setlease(struct vfs_handle_struct
*handle
,
453 struct files_struct
*fsp
, int leasetype
)
459 static bool skel_getlock(vfs_handle_struct
*handle
, files_struct
*fsp
,
460 off_t
*poffset
, off_t
*pcount
, int *ptype
,
467 static int skel_symlinkat(vfs_handle_struct
*handle
,
468 const struct smb_filename
*link_contents
,
469 struct files_struct
*dirfsp
,
470 const struct smb_filename
*new_smb_fname
)
476 static int skel_vfs_readlinkat(vfs_handle_struct
*handle
,
477 files_struct
*dirfsp
,
478 const struct smb_filename
*smb_fname
,
486 static int skel_linkat(vfs_handle_struct
*handle
,
487 files_struct
*srcfsp
,
488 const struct smb_filename
*old_smb_fname
,
489 files_struct
*dstfsp
,
490 const struct smb_filename
*new_smb_fname
,
497 static int skel_mknodat(vfs_handle_struct
*handle
,
498 files_struct
*dirfsp
,
499 const struct smb_filename
*smb_fname
,
507 static struct smb_filename
*skel_realpath(vfs_handle_struct
*handle
,
509 const struct smb_filename
*smb_fname
)
515 static int skel_chflags(vfs_handle_struct
*handle
,
516 const struct smb_filename
*smb_fname
,
523 static struct file_id
skel_file_id_create(vfs_handle_struct
*handle
,
524 const SMB_STRUCT_STAT
*sbuf
)
532 static uint64_t skel_fs_file_id(vfs_handle_struct
*handle
,
533 const SMB_STRUCT_STAT
*sbuf
)
539 struct skel_offload_read_state
{
543 static struct tevent_req
*skel_offload_read_send(
545 struct tevent_context
*ev
,
546 struct vfs_handle_struct
*handle
,
547 struct files_struct
*fsp
,
553 struct tevent_req
*req
= NULL
;
554 struct skel_offload_read_state
*state
= NULL
;
556 req
= tevent_req_create(mem_ctx
, &state
, struct skel_offload_read_state
);
561 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
562 return tevent_req_post(req
, ev
);
565 static NTSTATUS
skel_offload_read_recv(struct tevent_req
*req
,
566 struct vfs_handle_struct
*handle
,
568 DATA_BLOB
*_token_blob
)
572 if (tevent_req_is_nterror(req
, &status
)) {
573 tevent_req_received(req
);
576 tevent_req_received(req
);
581 struct skel_cc_state
{
584 static struct tevent_req
*skel_offload_write_send(struct vfs_handle_struct
*handle
,
586 struct tevent_context
*ev
,
589 off_t transfer_offset
,
590 struct files_struct
*dest_fsp
,
594 struct tevent_req
*req
;
595 struct skel_cc_state
*cc_state
;
597 req
= tevent_req_create(mem_ctx
, &cc_state
, struct skel_cc_state
);
602 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
603 return tevent_req_post(req
, ev
);
606 static NTSTATUS
skel_offload_write_recv(struct vfs_handle_struct
*handle
,
607 struct tevent_req
*req
,
612 if (tevent_req_is_nterror(req
, &status
)) {
613 tevent_req_received(req
);
616 tevent_req_received(req
);
621 static NTSTATUS
skel_get_compression(struct vfs_handle_struct
*handle
,
623 struct files_struct
*fsp
,
624 struct smb_filename
*smb_fname
,
625 uint16_t *_compression_fmt
)
627 return NT_STATUS_INVALID_DEVICE_REQUEST
;
630 static NTSTATUS
skel_set_compression(struct vfs_handle_struct
*handle
,
632 struct files_struct
*fsp
,
633 uint16_t compression_fmt
)
635 return NT_STATUS_INVALID_DEVICE_REQUEST
;
638 static NTSTATUS
skel_streaminfo(struct vfs_handle_struct
*handle
,
639 struct files_struct
*fsp
,
640 const struct smb_filename
*smb_fname
,
642 unsigned int *num_streams
,
643 struct stream_struct
**streams
)
645 return NT_STATUS_NOT_IMPLEMENTED
;
648 static int skel_get_real_filename(struct vfs_handle_struct
*handle
,
649 const struct smb_filename
*path
,
651 TALLOC_CTX
*mem_ctx
, char **found_name
)
657 static const char *skel_connectpath(struct vfs_handle_struct
*handle
,
658 const struct smb_filename
*smb_fname
)
664 static NTSTATUS
skel_brl_lock_windows(struct vfs_handle_struct
*handle
,
665 struct byte_range_lock
*br_lck
,
666 struct lock_struct
*plock
)
668 return NT_STATUS_NOT_IMPLEMENTED
;
671 static bool skel_brl_unlock_windows(struct vfs_handle_struct
*handle
,
672 struct byte_range_lock
*br_lck
,
673 const struct lock_struct
*plock
)
679 static bool skel_strict_lock_check(struct vfs_handle_struct
*handle
,
680 struct files_struct
*fsp
,
681 struct lock_struct
*plock
)
687 static NTSTATUS
skel_translate_name(struct vfs_handle_struct
*handle
,
688 const char *mapped_name
,
689 enum vfs_translate_direction direction
,
690 TALLOC_CTX
*mem_ctx
, char **pmapped_name
)
692 return NT_STATUS_NOT_IMPLEMENTED
;
695 static NTSTATUS
skel_fsctl(struct vfs_handle_struct
*handle
,
696 struct files_struct
*fsp
,
699 uint16_t req_flags
, /* Needed for UNICODE ... */
700 const uint8_t *_in_data
,
703 uint32_t max_out_len
, uint32_t *out_len
)
705 return NT_STATUS_NOT_IMPLEMENTED
;
708 static NTSTATUS
skel_readdir_attr(struct vfs_handle_struct
*handle
,
709 const struct smb_filename
*fname
,
711 struct readdir_attr_data
**pattr_data
)
713 return NT_STATUS_NOT_IMPLEMENTED
;
716 static NTSTATUS
skel_get_dos_attributes(struct vfs_handle_struct
*handle
,
717 struct smb_filename
*smb_fname
,
720 return NT_STATUS_NOT_IMPLEMENTED
;
723 struct skel_get_dos_attributes_state
{
724 struct vfs_aio_state aio_state
;
728 static struct tevent_req
*skel_get_dos_attributes_send(
730 struct tevent_context
*ev
,
731 struct vfs_handle_struct
*handle
,
732 files_struct
*dir_fsp
,
733 struct smb_filename
*smb_fname
)
735 struct tevent_req
*req
= NULL
;
736 struct skel_get_dos_attributes_state
*state
= NULL
;
738 req
= tevent_req_create(mem_ctx
, &state
,
739 struct skel_get_dos_attributes_state
);
744 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
745 return tevent_req_post(req
, ev
);
748 static NTSTATUS
skel_get_dos_attributes_recv(struct tevent_req
*req
,
749 struct vfs_aio_state
*aio_state
,
752 struct skel_get_dos_attributes_state
*state
=
754 struct skel_get_dos_attributes_state
);
757 if (tevent_req_is_nterror(req
, &status
)) {
758 tevent_req_received(req
);
762 *aio_state
= state
->aio_state
;
763 *dosmode
= state
->dosmode
;
764 tevent_req_received(req
);
768 static NTSTATUS
skel_fget_dos_attributes(struct vfs_handle_struct
*handle
,
769 struct files_struct
*fsp
,
772 return NT_STATUS_NOT_IMPLEMENTED
;
775 static NTSTATUS
skel_set_dos_attributes(struct vfs_handle_struct
*handle
,
776 const struct smb_filename
*smb_fname
,
779 return NT_STATUS_NOT_IMPLEMENTED
;
782 static NTSTATUS
skel_fset_dos_attributes(struct vfs_handle_struct
*handle
,
783 struct files_struct
*fsp
,
786 return NT_STATUS_NOT_IMPLEMENTED
;
789 static NTSTATUS
skel_fget_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
790 uint32_t security_info
,
792 struct security_descriptor
**ppdesc
)
794 return NT_STATUS_NOT_IMPLEMENTED
;
797 static NTSTATUS
skel_get_nt_acl_at(vfs_handle_struct
*handle
,
798 struct files_struct
*dirfsp
,
799 const struct smb_filename
*smb_fname
,
800 uint32_t security_info
,
802 struct security_descriptor
**ppdesc
)
804 return NT_STATUS_NOT_IMPLEMENTED
;
807 static NTSTATUS
skel_fset_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
808 uint32_t security_info_sent
,
809 const struct security_descriptor
*psd
)
811 return NT_STATUS_NOT_IMPLEMENTED
;
814 static SMB_ACL_T
skel_sys_acl_get_file(vfs_handle_struct
*handle
,
815 const struct smb_filename
*smb_fname
,
820 return (SMB_ACL_T
) NULL
;
823 static SMB_ACL_T
skel_sys_acl_get_fd(vfs_handle_struct
*handle
,
824 files_struct
*fsp
, TALLOC_CTX
*mem_ctx
)
827 return (SMB_ACL_T
) NULL
;
830 static int skel_sys_acl_blob_get_file(vfs_handle_struct
*handle
,
831 const struct smb_filename
*smb_fname
,
833 char **blob_description
,
840 static int skel_sys_acl_blob_get_fd(vfs_handle_struct
*handle
,
841 files_struct
*fsp
, TALLOC_CTX
*mem_ctx
,
842 char **blob_description
, DATA_BLOB
*blob
)
848 static int skel_sys_acl_set_file(vfs_handle_struct
*handle
,
849 const struct smb_filename
*smb_fname
,
850 SMB_ACL_TYPE_T acltype
,
857 static int skel_sys_acl_set_fd(vfs_handle_struct
*handle
, files_struct
*fsp
,
864 static int skel_sys_acl_delete_def_file(vfs_handle_struct
*handle
,
865 const struct smb_filename
*smb_fname
)
871 static ssize_t
skel_getxattr(vfs_handle_struct
*handle
,
872 const struct smb_filename
*smb_fname
,
881 struct skel_getxattrat_state
{
882 struct vfs_aio_state aio_state
;
884 uint8_t *xattr_value
;
887 static struct tevent_req
*skel_getxattrat_send(
889 struct tevent_context
*ev
,
890 struct vfs_handle_struct
*handle
,
891 files_struct
*dir_fsp
,
892 const struct smb_filename
*smb_fname
,
893 const char *xattr_name
,
896 struct tevent_req
*req
= NULL
;
897 struct skel_getxattrat_state
*state
= NULL
;
899 req
= tevent_req_create(mem_ctx
, &state
,
900 struct skel_getxattrat_state
);
905 tevent_req_error(req
, ENOSYS
);
906 return tevent_req_post(req
, ev
);
909 static ssize_t
skel_getxattrat_recv(struct tevent_req
*req
,
910 struct vfs_aio_state
*aio_state
,
912 uint8_t **xattr_value
)
914 struct skel_getxattrat_state
*state
= tevent_req_data(
915 req
, struct skel_getxattrat_state
);
918 if (tevent_req_is_unix_error(req
, &aio_state
->error
)) {
919 tevent_req_received(req
);
923 *aio_state
= state
->aio_state
;
924 xattr_size
= state
->xattr_size
;
925 if (xattr_value
!= NULL
) {
926 *xattr_value
= talloc_move(mem_ctx
, &state
->xattr_value
);
929 tevent_req_received(req
);
933 static ssize_t
skel_fgetxattr(vfs_handle_struct
*handle
,
934 struct files_struct
*fsp
, const char *name
,
935 void *value
, size_t size
)
941 static ssize_t
skel_listxattr(vfs_handle_struct
*handle
,
942 const struct smb_filename
*smb_fname
,
950 static ssize_t
skel_flistxattr(vfs_handle_struct
*handle
,
951 struct files_struct
*fsp
, char *list
,
958 static int skel_removexattr(vfs_handle_struct
*handle
,
959 const struct smb_filename
*smb_fname
,
966 static int skel_fremovexattr(vfs_handle_struct
*handle
,
967 struct files_struct
*fsp
, const char *name
)
973 static int skel_setxattr(vfs_handle_struct
*handle
,
974 const struct smb_filename
*smb_fname
,
984 static int skel_fsetxattr(vfs_handle_struct
*handle
, struct files_struct
*fsp
,
985 const char *name
, const void *value
, size_t size
,
992 static bool skel_aio_force(struct vfs_handle_struct
*handle
,
993 struct files_struct
*fsp
)
999 static NTSTATUS
skel_audit_file(struct vfs_handle_struct
*handle
,
1000 struct smb_filename
*file
,
1001 struct security_acl
*sacl
,
1002 uint32_t access_requested
,
1003 uint32_t access_denied
)
1005 return NT_STATUS_NOT_IMPLEMENTED
;
1008 static NTSTATUS
skel_durable_cookie(struct vfs_handle_struct
*handle
,
1009 struct files_struct
*fsp
,
1010 TALLOC_CTX
*mem_ctx
,
1013 return NT_STATUS_NOT_IMPLEMENTED
;
1016 static NTSTATUS
skel_durable_disconnect(struct vfs_handle_struct
*handle
,
1017 struct files_struct
*fsp
,
1018 const DATA_BLOB old_cookie
,
1019 TALLOC_CTX
*mem_ctx
,
1020 DATA_BLOB
*new_cookie
)
1022 return NT_STATUS_NOT_IMPLEMENTED
;
1025 static NTSTATUS
skel_durable_reconnect(struct vfs_handle_struct
*handle
,
1026 struct smb_request
*smb1req
,
1027 struct smbXsrv_open
*op
,
1028 const DATA_BLOB old_cookie
,
1029 TALLOC_CTX
*mem_ctx
,
1030 struct files_struct
**fsp
,
1031 DATA_BLOB
*new_cookie
)
1033 return NT_STATUS_NOT_IMPLEMENTED
;
1036 /* VFS operations structure */
1038 static struct vfs_fn_pointers skel_opaque_fns
= {
1039 /* Disk operations */
1041 .connect_fn
= skel_connect
,
1042 .disconnect_fn
= skel_disconnect
,
1043 .disk_free_fn
= skel_disk_free
,
1044 .get_quota_fn
= skel_get_quota
,
1045 .set_quota_fn
= skel_set_quota
,
1046 .get_shadow_copy_data_fn
= skel_get_shadow_copy_data
,
1047 .statvfs_fn
= skel_statvfs
,
1048 .fs_capabilities_fn
= skel_fs_capabilities
,
1049 .get_dfs_referrals_fn
= skel_get_dfs_referrals
,
1050 .create_dfs_pathat_fn
= skel_create_dfs_pathat
,
1051 .read_dfs_pathat_fn
= skel_read_dfs_pathat
,
1052 .snap_check_path_fn
= skel_snap_check_path
,
1053 .snap_create_fn
= skel_snap_create
,
1054 .snap_delete_fn
= skel_snap_delete
,
1056 /* Directory operations */
1058 .fdopendir_fn
= skel_fdopendir
,
1059 .readdir_fn
= skel_readdir
,
1060 .seekdir_fn
= skel_seekdir
,
1061 .telldir_fn
= skel_telldir
,
1062 .rewind_dir_fn
= skel_rewind_dir
,
1063 .mkdirat_fn
= skel_mkdirat
,
1064 .closedir_fn
= skel_closedir
,
1066 /* File operations */
1068 .openat_fn
= skel_openat
,
1069 .create_file_fn
= skel_create_file
,
1070 .close_fn
= skel_close_fn
,
1071 .pread_fn
= skel_pread
,
1072 .pread_send_fn
= skel_pread_send
,
1073 .pread_recv_fn
= skel_pread_recv
,
1074 .pwrite_fn
= skel_pwrite
,
1075 .pwrite_send_fn
= skel_pwrite_send
,
1076 .pwrite_recv_fn
= skel_pwrite_recv
,
1077 .lseek_fn
= skel_lseek
,
1078 .sendfile_fn
= skel_sendfile
,
1079 .recvfile_fn
= skel_recvfile
,
1080 .renameat_fn
= skel_renameat
,
1081 .fsync_send_fn
= skel_fsync_send
,
1082 .fsync_recv_fn
= skel_fsync_recv
,
1083 .stat_fn
= skel_stat
,
1084 .fstat_fn
= skel_fstat
,
1085 .lstat_fn
= skel_lstat
,
1086 .get_alloc_size_fn
= skel_get_alloc_size
,
1087 .unlinkat_fn
= skel_unlinkat
,
1088 .chmod_fn
= skel_chmod
,
1089 .fchmod_fn
= skel_fchmod
,
1090 .fchown_fn
= skel_fchown
,
1091 .lchown_fn
= skel_lchown
,
1092 .chdir_fn
= skel_chdir
,
1093 .getwd_fn
= skel_getwd
,
1094 .ntimes_fn
= skel_ntimes
,
1095 .ftruncate_fn
= skel_ftruncate
,
1096 .fallocate_fn
= skel_fallocate
,
1097 .lock_fn
= skel_lock
,
1098 .kernel_flock_fn
= skel_kernel_flock
,
1099 .fcntl_fn
= skel_fcntl
,
1100 .linux_setlease_fn
= skel_linux_setlease
,
1101 .getlock_fn
= skel_getlock
,
1102 .symlinkat_fn
= skel_symlinkat
,
1103 .readlinkat_fn
= skel_vfs_readlinkat
,
1104 .linkat_fn
= skel_linkat
,
1105 .mknodat_fn
= skel_mknodat
,
1106 .realpath_fn
= skel_realpath
,
1107 .chflags_fn
= skel_chflags
,
1108 .file_id_create_fn
= skel_file_id_create
,
1109 .fs_file_id_fn
= skel_fs_file_id
,
1110 .offload_read_send_fn
= skel_offload_read_send
,
1111 .offload_read_recv_fn
= skel_offload_read_recv
,
1112 .offload_write_send_fn
= skel_offload_write_send
,
1113 .offload_write_recv_fn
= skel_offload_write_recv
,
1114 .get_compression_fn
= skel_get_compression
,
1115 .set_compression_fn
= skel_set_compression
,
1117 .streaminfo_fn
= skel_streaminfo
,
1118 .get_real_filename_fn
= skel_get_real_filename
,
1119 .connectpath_fn
= skel_connectpath
,
1120 .brl_lock_windows_fn
= skel_brl_lock_windows
,
1121 .brl_unlock_windows_fn
= skel_brl_unlock_windows
,
1122 .strict_lock_check_fn
= skel_strict_lock_check
,
1123 .translate_name_fn
= skel_translate_name
,
1124 .fsctl_fn
= skel_fsctl
,
1125 .readdir_attr_fn
= skel_readdir_attr
,
1126 .audit_file_fn
= skel_audit_file
,
1128 /* DOS attributes. */
1129 .get_dos_attributes_fn
= skel_get_dos_attributes
,
1130 .get_dos_attributes_send_fn
= skel_get_dos_attributes_send
,
1131 .get_dos_attributes_recv_fn
= skel_get_dos_attributes_recv
,
1132 .fget_dos_attributes_fn
= skel_fget_dos_attributes
,
1133 .set_dos_attributes_fn
= skel_set_dos_attributes
,
1134 .fset_dos_attributes_fn
= skel_fset_dos_attributes
,
1136 /* NT ACL operations. */
1138 .fget_nt_acl_fn
= skel_fget_nt_acl
,
1139 .get_nt_acl_at_fn
= skel_get_nt_acl_at
,
1140 .fset_nt_acl_fn
= skel_fset_nt_acl
,
1142 /* POSIX ACL operations. */
1144 .sys_acl_get_file_fn
= skel_sys_acl_get_file
,
1145 .sys_acl_get_fd_fn
= skel_sys_acl_get_fd
,
1146 .sys_acl_blob_get_file_fn
= skel_sys_acl_blob_get_file
,
1147 .sys_acl_blob_get_fd_fn
= skel_sys_acl_blob_get_fd
,
1148 .sys_acl_set_file_fn
= skel_sys_acl_set_file
,
1149 .sys_acl_set_fd_fn
= skel_sys_acl_set_fd
,
1150 .sys_acl_delete_def_file_fn
= skel_sys_acl_delete_def_file
,
1152 /* EA operations. */
1153 .getxattr_fn
= skel_getxattr
,
1154 .getxattrat_send_fn
= skel_getxattrat_send
,
1155 .getxattrat_recv_fn
= skel_getxattrat_recv
,
1156 .fgetxattr_fn
= skel_fgetxattr
,
1157 .listxattr_fn
= skel_listxattr
,
1158 .flistxattr_fn
= skel_flistxattr
,
1159 .removexattr_fn
= skel_removexattr
,
1160 .fremovexattr_fn
= skel_fremovexattr
,
1161 .setxattr_fn
= skel_setxattr
,
1162 .fsetxattr_fn
= skel_fsetxattr
,
1164 /* aio operations */
1165 .aio_force_fn
= skel_aio_force
,
1167 /* durable handle operations */
1168 .durable_cookie_fn
= skel_durable_cookie
,
1169 .durable_disconnect_fn
= skel_durable_disconnect
,
1170 .durable_reconnect_fn
= skel_durable_reconnect
,
1174 NTSTATUS
vfs_skel_opaque_init(TALLOC_CTX
*ctx
)
1177 * smb_vfs_assert_all_fns() makes sure every
1178 * call is implemented.
1180 * An opaque module requires this!
1182 smb_vfs_assert_all_fns(&skel_opaque_fns
, "skel_opaque");
1183 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION
, "skel_opaque",