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 DIR *skel_opendir(vfs_handle_struct
*handle
,
126 const struct smb_filename
*smb_fname
,
133 static NTSTATUS
skel_snap_check_path(struct vfs_handle_struct
*handle
,
135 const char *service_path
,
138 return NT_STATUS_NOT_SUPPORTED
;
141 static NTSTATUS
skel_snap_create(struct vfs_handle_struct
*handle
,
143 const char *base_volume
,
149 return NT_STATUS_NOT_SUPPORTED
;
152 static NTSTATUS
skel_snap_delete(struct vfs_handle_struct
*handle
,
157 return NT_STATUS_NOT_SUPPORTED
;
160 static DIR *skel_fdopendir(vfs_handle_struct
*handle
, files_struct
*fsp
,
161 const char *mask
, uint32_t attr
)
166 static struct dirent
*skel_readdir(vfs_handle_struct
*handle
,
167 DIR *dirp
, SMB_STRUCT_STAT
*sbuf
)
172 static void skel_seekdir(vfs_handle_struct
*handle
, DIR *dirp
, long offset
)
177 static long skel_telldir(vfs_handle_struct
*handle
, DIR *dirp
)
182 static void skel_rewind_dir(vfs_handle_struct
*handle
, DIR *dirp
)
187 static int skel_mkdirat(vfs_handle_struct
*handle
,
188 struct files_struct
*dirfsp
,
189 const struct smb_filename
*smb_fname
,
196 static int skel_closedir(vfs_handle_struct
*handle
, DIR *dir
)
202 static int skel_open(vfs_handle_struct
*handle
, struct smb_filename
*smb_fname
,
203 files_struct
*fsp
, int flags
, mode_t mode
)
209 static NTSTATUS
skel_create_file(struct vfs_handle_struct
*handle
,
210 struct smb_request
*req
,
211 uint16_t root_dir_fid
,
212 struct smb_filename
*smb_fname
,
213 uint32_t access_mask
,
214 uint32_t share_access
,
215 uint32_t create_disposition
,
216 uint32_t create_options
,
217 uint32_t file_attributes
,
218 uint32_t oplock_request
,
219 const struct smb2_lease
*lease
,
220 uint64_t allocation_size
,
221 uint32_t private_flags
,
222 struct security_descriptor
*sd
,
223 struct ea_list
*ea_list
,
224 files_struct
**result
, int *pinfo
,
225 const struct smb2_create_blobs
*in_context_blobs
,
226 struct smb2_create_blobs
*out_context_blobs
)
228 return NT_STATUS_NOT_IMPLEMENTED
;
231 static int skel_close_fn(vfs_handle_struct
*handle
, files_struct
*fsp
)
237 static ssize_t
skel_pread(vfs_handle_struct
*handle
, files_struct
*fsp
,
238 void *data
, size_t n
, off_t offset
)
244 static struct tevent_req
*skel_pread_send(struct vfs_handle_struct
*handle
,
246 struct tevent_context
*ev
,
247 struct files_struct
*fsp
,
248 void *data
, size_t n
, off_t offset
)
253 static ssize_t
skel_pread_recv(struct tevent_req
*req
,
254 struct vfs_aio_state
*vfs_aio_state
)
256 vfs_aio_state
->error
= ENOSYS
;
260 static ssize_t
skel_pwrite(vfs_handle_struct
*handle
, files_struct
*fsp
,
261 const void *data
, size_t n
, off_t offset
)
267 static struct tevent_req
*skel_pwrite_send(struct vfs_handle_struct
*handle
,
269 struct tevent_context
*ev
,
270 struct files_struct
*fsp
,
272 size_t n
, off_t offset
)
277 static ssize_t
skel_pwrite_recv(struct tevent_req
*req
,
278 struct vfs_aio_state
*vfs_aio_state
)
280 vfs_aio_state
->error
= ENOSYS
;
284 static off_t
skel_lseek(vfs_handle_struct
*handle
, files_struct
*fsp
,
285 off_t offset
, int whence
)
291 static ssize_t
skel_sendfile(vfs_handle_struct
*handle
, int tofd
,
292 files_struct
*fromfsp
, const DATA_BLOB
*hdr
,
293 off_t offset
, size_t n
)
299 static ssize_t
skel_recvfile(vfs_handle_struct
*handle
, int fromfd
,
300 files_struct
*tofsp
, off_t offset
, size_t n
)
306 static int skel_renameat(vfs_handle_struct
*handle
,
307 files_struct
*srcfsp
,
308 const struct smb_filename
*smb_fname_src
,
309 files_struct
*dstfsp
,
310 const struct smb_filename
*smb_fname_dst
)
316 static struct tevent_req
*skel_fsync_send(struct vfs_handle_struct
*handle
,
318 struct tevent_context
*ev
,
319 struct files_struct
*fsp
)
324 static int skel_fsync_recv(struct tevent_req
*req
,
325 struct vfs_aio_state
*vfs_aio_state
)
327 vfs_aio_state
->error
= ENOSYS
;
331 static int skel_stat(vfs_handle_struct
*handle
, struct smb_filename
*smb_fname
)
337 static int skel_fstat(vfs_handle_struct
*handle
, files_struct
*fsp
,
338 SMB_STRUCT_STAT
*sbuf
)
344 static int skel_lstat(vfs_handle_struct
*handle
,
345 struct smb_filename
*smb_fname
)
351 static uint64_t skel_get_alloc_size(struct vfs_handle_struct
*handle
,
352 struct files_struct
*fsp
,
353 const SMB_STRUCT_STAT
*sbuf
)
359 static int skel_unlinkat(vfs_handle_struct
*handle
,
360 struct files_struct
*dirfsp
,
361 const struct smb_filename
*smb_fname
,
368 static int skel_chmod(vfs_handle_struct
*handle
,
369 const struct smb_filename
*smb_fname
,
376 static int skel_fchmod(vfs_handle_struct
*handle
, files_struct
*fsp
,
383 static int skel_fchown(vfs_handle_struct
*handle
, files_struct
*fsp
,
384 uid_t uid
, gid_t gid
)
390 static int skel_lchown(vfs_handle_struct
*handle
,
391 const struct smb_filename
*smb_fname
,
399 static int skel_chdir(vfs_handle_struct
*handle
,
400 const struct smb_filename
*smb_fname
)
406 static struct smb_filename
*skel_getwd(vfs_handle_struct
*handle
,
413 static int skel_ntimes(vfs_handle_struct
*handle
,
414 const struct smb_filename
*smb_fname
,
415 struct smb_file_time
*ft
)
421 static int skel_ftruncate(vfs_handle_struct
*handle
, files_struct
*fsp
,
428 static int skel_fallocate(vfs_handle_struct
*handle
, files_struct
*fsp
,
429 uint32_t mode
, off_t offset
, off_t len
)
435 static bool skel_lock(vfs_handle_struct
*handle
, files_struct
*fsp
, int op
,
436 off_t offset
, off_t count
, int type
)
442 static int skel_kernel_flock(struct vfs_handle_struct
*handle
,
443 struct files_struct
*fsp
,
444 uint32_t share_mode
, uint32_t access_mask
)
450 static int skel_fcntl(struct vfs_handle_struct
*handle
,
451 struct files_struct
*fsp
, int cmd
, va_list cmd_arg
)
457 static int skel_linux_setlease(struct vfs_handle_struct
*handle
,
458 struct files_struct
*fsp
, int leasetype
)
464 static bool skel_getlock(vfs_handle_struct
*handle
, files_struct
*fsp
,
465 off_t
*poffset
, off_t
*pcount
, int *ptype
,
472 static int skel_symlinkat(vfs_handle_struct
*handle
,
473 const char *link_contents
,
474 struct files_struct
*dirfsp
,
475 const struct smb_filename
*new_smb_fname
)
481 static int skel_vfs_readlinkat(vfs_handle_struct
*handle
,
482 files_struct
*dirfsp
,
483 const struct smb_filename
*smb_fname
,
491 static int skel_linkat(vfs_handle_struct
*handle
,
492 files_struct
*srcfsp
,
493 const struct smb_filename
*old_smb_fname
,
494 files_struct
*dstfsp
,
495 const struct smb_filename
*new_smb_fname
,
502 static int skel_mknodat(vfs_handle_struct
*handle
,
503 files_struct
*dirfsp
,
504 const struct smb_filename
*smb_fname
,
512 static struct smb_filename
*skel_realpath(vfs_handle_struct
*handle
,
514 const struct smb_filename
*smb_fname
)
520 static int skel_chflags(vfs_handle_struct
*handle
,
521 const struct smb_filename
*smb_fname
,
528 static struct file_id
skel_file_id_create(vfs_handle_struct
*handle
,
529 const SMB_STRUCT_STAT
*sbuf
)
537 static uint64_t skel_fs_file_id(vfs_handle_struct
*handle
,
538 const SMB_STRUCT_STAT
*sbuf
)
544 struct skel_offload_read_state
{
548 static struct tevent_req
*skel_offload_read_send(
550 struct tevent_context
*ev
,
551 struct vfs_handle_struct
*handle
,
552 struct files_struct
*fsp
,
558 struct tevent_req
*req
= NULL
;
559 struct skel_offload_read_state
*state
= NULL
;
561 req
= tevent_req_create(mem_ctx
, &state
, struct skel_offload_read_state
);
566 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
567 return tevent_req_post(req
, ev
);
570 static NTSTATUS
skel_offload_read_recv(struct tevent_req
*req
,
571 struct vfs_handle_struct
*handle
,
573 DATA_BLOB
*_token_blob
)
577 if (tevent_req_is_nterror(req
, &status
)) {
578 tevent_req_received(req
);
581 tevent_req_received(req
);
586 struct skel_cc_state
{
589 static struct tevent_req
*skel_offload_write_send(struct vfs_handle_struct
*handle
,
591 struct tevent_context
*ev
,
594 off_t transfer_offset
,
595 struct files_struct
*dest_fsp
,
599 struct tevent_req
*req
;
600 struct skel_cc_state
*cc_state
;
602 req
= tevent_req_create(mem_ctx
, &cc_state
, struct skel_cc_state
);
607 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
608 return tevent_req_post(req
, ev
);
611 static NTSTATUS
skel_offload_write_recv(struct vfs_handle_struct
*handle
,
612 struct tevent_req
*req
,
617 if (tevent_req_is_nterror(req
, &status
)) {
618 tevent_req_received(req
);
621 tevent_req_received(req
);
626 static NTSTATUS
skel_get_compression(struct vfs_handle_struct
*handle
,
628 struct files_struct
*fsp
,
629 struct smb_filename
*smb_fname
,
630 uint16_t *_compression_fmt
)
632 return NT_STATUS_INVALID_DEVICE_REQUEST
;
635 static NTSTATUS
skel_set_compression(struct vfs_handle_struct
*handle
,
637 struct files_struct
*fsp
,
638 uint16_t compression_fmt
)
640 return NT_STATUS_INVALID_DEVICE_REQUEST
;
643 static NTSTATUS
skel_streaminfo(struct vfs_handle_struct
*handle
,
644 struct files_struct
*fsp
,
645 const struct smb_filename
*smb_fname
,
647 unsigned int *num_streams
,
648 struct stream_struct
**streams
)
650 return NT_STATUS_NOT_IMPLEMENTED
;
653 static int skel_get_real_filename(struct vfs_handle_struct
*handle
,
656 TALLOC_CTX
*mem_ctx
, char **found_name
)
662 static const char *skel_connectpath(struct vfs_handle_struct
*handle
,
663 const struct smb_filename
*smb_fname
)
669 static NTSTATUS
skel_brl_lock_windows(struct vfs_handle_struct
*handle
,
670 struct byte_range_lock
*br_lck
,
671 struct lock_struct
*plock
)
673 return NT_STATUS_NOT_IMPLEMENTED
;
676 static bool skel_brl_unlock_windows(struct vfs_handle_struct
*handle
,
677 struct byte_range_lock
*br_lck
,
678 const struct lock_struct
*plock
)
684 static bool skel_strict_lock_check(struct vfs_handle_struct
*handle
,
685 struct files_struct
*fsp
,
686 struct lock_struct
*plock
)
692 static NTSTATUS
skel_translate_name(struct vfs_handle_struct
*handle
,
693 const char *mapped_name
,
694 enum vfs_translate_direction direction
,
695 TALLOC_CTX
*mem_ctx
, char **pmapped_name
)
697 return NT_STATUS_NOT_IMPLEMENTED
;
700 static NTSTATUS
skel_fsctl(struct vfs_handle_struct
*handle
,
701 struct files_struct
*fsp
,
704 uint16_t req_flags
, /* Needed for UNICODE ... */
705 const uint8_t *_in_data
,
708 uint32_t max_out_len
, uint32_t *out_len
)
710 return NT_STATUS_NOT_IMPLEMENTED
;
713 static NTSTATUS
skel_readdir_attr(struct vfs_handle_struct
*handle
,
714 const struct smb_filename
*fname
,
716 struct readdir_attr_data
**pattr_data
)
718 return NT_STATUS_NOT_IMPLEMENTED
;
721 static NTSTATUS
skel_get_dos_attributes(struct vfs_handle_struct
*handle
,
722 struct smb_filename
*smb_fname
,
725 return NT_STATUS_NOT_IMPLEMENTED
;
728 struct skel_get_dos_attributes_state
{
729 struct vfs_aio_state aio_state
;
733 static struct tevent_req
*skel_get_dos_attributes_send(
735 struct tevent_context
*ev
,
736 struct vfs_handle_struct
*handle
,
737 files_struct
*dir_fsp
,
738 struct smb_filename
*smb_fname
)
740 struct tevent_req
*req
= NULL
;
741 struct skel_get_dos_attributes_state
*state
= NULL
;
743 req
= tevent_req_create(mem_ctx
, &state
,
744 struct skel_get_dos_attributes_state
);
749 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
750 return tevent_req_post(req
, ev
);
753 static NTSTATUS
skel_get_dos_attributes_recv(struct tevent_req
*req
,
754 struct vfs_aio_state
*aio_state
,
757 struct skel_get_dos_attributes_state
*state
=
759 struct skel_get_dos_attributes_state
);
762 if (tevent_req_is_nterror(req
, &status
)) {
763 tevent_req_received(req
);
767 *aio_state
= state
->aio_state
;
768 *dosmode
= state
->dosmode
;
769 tevent_req_received(req
);
773 static NTSTATUS
skel_fget_dos_attributes(struct vfs_handle_struct
*handle
,
774 struct files_struct
*fsp
,
777 return NT_STATUS_NOT_IMPLEMENTED
;
780 static NTSTATUS
skel_set_dos_attributes(struct vfs_handle_struct
*handle
,
781 const struct smb_filename
*smb_fname
,
784 return NT_STATUS_NOT_IMPLEMENTED
;
787 static NTSTATUS
skel_fset_dos_attributes(struct vfs_handle_struct
*handle
,
788 struct files_struct
*fsp
,
791 return NT_STATUS_NOT_IMPLEMENTED
;
794 static NTSTATUS
skel_fget_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
795 uint32_t security_info
,
797 struct security_descriptor
**ppdesc
)
799 return NT_STATUS_NOT_IMPLEMENTED
;
802 static NTSTATUS
skel_get_nt_acl(vfs_handle_struct
*handle
,
803 const struct smb_filename
*smb_fname
,
804 uint32_t security_info
,
806 struct security_descriptor
**ppdesc
)
808 return NT_STATUS_NOT_IMPLEMENTED
;
811 static NTSTATUS
skel_fset_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
812 uint32_t security_info_sent
,
813 const struct security_descriptor
*psd
)
815 return NT_STATUS_NOT_IMPLEMENTED
;
818 static SMB_ACL_T
skel_sys_acl_get_file(vfs_handle_struct
*handle
,
819 const struct smb_filename
*smb_fname
,
824 return (SMB_ACL_T
) NULL
;
827 static SMB_ACL_T
skel_sys_acl_get_fd(vfs_handle_struct
*handle
,
828 files_struct
*fsp
, TALLOC_CTX
*mem_ctx
)
831 return (SMB_ACL_T
) NULL
;
834 static int skel_sys_acl_blob_get_file(vfs_handle_struct
*handle
,
835 const struct smb_filename
*smb_fname
,
837 char **blob_description
,
844 static int skel_sys_acl_blob_get_fd(vfs_handle_struct
*handle
,
845 files_struct
*fsp
, TALLOC_CTX
*mem_ctx
,
846 char **blob_description
, DATA_BLOB
*blob
)
852 static int skel_sys_acl_set_file(vfs_handle_struct
*handle
,
853 const struct smb_filename
*smb_fname
,
854 SMB_ACL_TYPE_T acltype
,
861 static int skel_sys_acl_set_fd(vfs_handle_struct
*handle
, files_struct
*fsp
,
868 static int skel_sys_acl_delete_def_file(vfs_handle_struct
*handle
,
869 const struct smb_filename
*smb_fname
)
875 static ssize_t
skel_getxattr(vfs_handle_struct
*handle
,
876 const struct smb_filename
*smb_fname
,
885 struct skel_getxattrat_state
{
886 struct vfs_aio_state aio_state
;
888 uint8_t *xattr_value
;
891 static struct tevent_req
*skel_getxattrat_send(
893 struct tevent_context
*ev
,
894 struct vfs_handle_struct
*handle
,
895 files_struct
*dir_fsp
,
896 const struct smb_filename
*smb_fname
,
897 const char *xattr_name
,
900 struct tevent_req
*req
= NULL
;
901 struct skel_getxattrat_state
*state
= NULL
;
903 req
= tevent_req_create(mem_ctx
, &state
,
904 struct skel_getxattrat_state
);
909 tevent_req_error(req
, ENOSYS
);
910 return tevent_req_post(req
, ev
);
913 static ssize_t
skel_getxattrat_recv(struct tevent_req
*req
,
914 struct vfs_aio_state
*aio_state
,
916 uint8_t **xattr_value
)
918 struct skel_getxattrat_state
*state
= tevent_req_data(
919 req
, struct skel_getxattrat_state
);
922 if (tevent_req_is_unix_error(req
, &aio_state
->error
)) {
923 tevent_req_received(req
);
927 *aio_state
= state
->aio_state
;
928 xattr_size
= state
->xattr_size
;
929 if (xattr_value
!= NULL
) {
930 *xattr_value
= talloc_move(mem_ctx
, &state
->xattr_value
);
933 tevent_req_received(req
);
937 static ssize_t
skel_fgetxattr(vfs_handle_struct
*handle
,
938 struct files_struct
*fsp
, const char *name
,
939 void *value
, size_t size
)
945 static ssize_t
skel_listxattr(vfs_handle_struct
*handle
,
946 const struct smb_filename
*smb_fname
,
954 static ssize_t
skel_flistxattr(vfs_handle_struct
*handle
,
955 struct files_struct
*fsp
, char *list
,
962 static int skel_removexattr(vfs_handle_struct
*handle
,
963 const struct smb_filename
*smb_fname
,
970 static int skel_fremovexattr(vfs_handle_struct
*handle
,
971 struct files_struct
*fsp
, const char *name
)
977 static int skel_setxattr(vfs_handle_struct
*handle
,
978 const struct smb_filename
*smb_fname
,
988 static int skel_fsetxattr(vfs_handle_struct
*handle
, struct files_struct
*fsp
,
989 const char *name
, const void *value
, size_t size
,
996 static bool skel_aio_force(struct vfs_handle_struct
*handle
,
997 struct files_struct
*fsp
)
1003 static NTSTATUS
skel_audit_file(struct vfs_handle_struct
*handle
,
1004 struct smb_filename
*file
,
1005 struct security_acl
*sacl
,
1006 uint32_t access_requested
,
1007 uint32_t access_denied
)
1009 return NT_STATUS_NOT_IMPLEMENTED
;
1012 static NTSTATUS
skel_durable_cookie(struct vfs_handle_struct
*handle
,
1013 struct files_struct
*fsp
,
1014 TALLOC_CTX
*mem_ctx
,
1017 return NT_STATUS_NOT_IMPLEMENTED
;
1020 static NTSTATUS
skel_durable_disconnect(struct vfs_handle_struct
*handle
,
1021 struct files_struct
*fsp
,
1022 const DATA_BLOB old_cookie
,
1023 TALLOC_CTX
*mem_ctx
,
1024 DATA_BLOB
*new_cookie
)
1026 return NT_STATUS_NOT_IMPLEMENTED
;
1029 static NTSTATUS
skel_durable_reconnect(struct vfs_handle_struct
*handle
,
1030 struct smb_request
*smb1req
,
1031 struct smbXsrv_open
*op
,
1032 const DATA_BLOB old_cookie
,
1033 TALLOC_CTX
*mem_ctx
,
1034 struct files_struct
**fsp
,
1035 DATA_BLOB
*new_cookie
)
1037 return NT_STATUS_NOT_IMPLEMENTED
;
1040 /* VFS operations structure */
1042 static struct vfs_fn_pointers skel_opaque_fns
= {
1043 /* Disk operations */
1045 .connect_fn
= skel_connect
,
1046 .disconnect_fn
= skel_disconnect
,
1047 .disk_free_fn
= skel_disk_free
,
1048 .get_quota_fn
= skel_get_quota
,
1049 .set_quota_fn
= skel_set_quota
,
1050 .get_shadow_copy_data_fn
= skel_get_shadow_copy_data
,
1051 .statvfs_fn
= skel_statvfs
,
1052 .fs_capabilities_fn
= skel_fs_capabilities
,
1053 .get_dfs_referrals_fn
= skel_get_dfs_referrals
,
1054 .create_dfs_pathat_fn
= skel_create_dfs_pathat
,
1055 .read_dfs_pathat_fn
= skel_read_dfs_pathat
,
1056 .snap_check_path_fn
= skel_snap_check_path
,
1057 .snap_create_fn
= skel_snap_create
,
1058 .snap_delete_fn
= skel_snap_delete
,
1060 /* Directory operations */
1062 .opendir_fn
= skel_opendir
,
1063 .fdopendir_fn
= skel_fdopendir
,
1064 .readdir_fn
= skel_readdir
,
1065 .seekdir_fn
= skel_seekdir
,
1066 .telldir_fn
= skel_telldir
,
1067 .rewind_dir_fn
= skel_rewind_dir
,
1068 .mkdirat_fn
= skel_mkdirat
,
1069 .closedir_fn
= skel_closedir
,
1071 /* File operations */
1073 .open_fn
= skel_open
,
1074 .create_file_fn
= skel_create_file
,
1075 .close_fn
= skel_close_fn
,
1076 .pread_fn
= skel_pread
,
1077 .pread_send_fn
= skel_pread_send
,
1078 .pread_recv_fn
= skel_pread_recv
,
1079 .pwrite_fn
= skel_pwrite
,
1080 .pwrite_send_fn
= skel_pwrite_send
,
1081 .pwrite_recv_fn
= skel_pwrite_recv
,
1082 .lseek_fn
= skel_lseek
,
1083 .sendfile_fn
= skel_sendfile
,
1084 .recvfile_fn
= skel_recvfile
,
1085 .renameat_fn
= skel_renameat
,
1086 .fsync_send_fn
= skel_fsync_send
,
1087 .fsync_recv_fn
= skel_fsync_recv
,
1088 .stat_fn
= skel_stat
,
1089 .fstat_fn
= skel_fstat
,
1090 .lstat_fn
= skel_lstat
,
1091 .get_alloc_size_fn
= skel_get_alloc_size
,
1092 .unlinkat_fn
= skel_unlinkat
,
1093 .chmod_fn
= skel_chmod
,
1094 .fchmod_fn
= skel_fchmod
,
1095 .fchown_fn
= skel_fchown
,
1096 .lchown_fn
= skel_lchown
,
1097 .chdir_fn
= skel_chdir
,
1098 .getwd_fn
= skel_getwd
,
1099 .ntimes_fn
= skel_ntimes
,
1100 .ftruncate_fn
= skel_ftruncate
,
1101 .fallocate_fn
= skel_fallocate
,
1102 .lock_fn
= skel_lock
,
1103 .kernel_flock_fn
= skel_kernel_flock
,
1104 .fcntl_fn
= skel_fcntl
,
1105 .linux_setlease_fn
= skel_linux_setlease
,
1106 .getlock_fn
= skel_getlock
,
1107 .symlinkat_fn
= skel_symlinkat
,
1108 .readlinkat_fn
= skel_vfs_readlinkat
,
1109 .linkat_fn
= skel_linkat
,
1110 .mknodat_fn
= skel_mknodat
,
1111 .realpath_fn
= skel_realpath
,
1112 .chflags_fn
= skel_chflags
,
1113 .file_id_create_fn
= skel_file_id_create
,
1114 .fs_file_id_fn
= skel_fs_file_id
,
1115 .offload_read_send_fn
= skel_offload_read_send
,
1116 .offload_read_recv_fn
= skel_offload_read_recv
,
1117 .offload_write_send_fn
= skel_offload_write_send
,
1118 .offload_write_recv_fn
= skel_offload_write_recv
,
1119 .get_compression_fn
= skel_get_compression
,
1120 .set_compression_fn
= skel_set_compression
,
1122 .streaminfo_fn
= skel_streaminfo
,
1123 .get_real_filename_fn
= skel_get_real_filename
,
1124 .connectpath_fn
= skel_connectpath
,
1125 .brl_lock_windows_fn
= skel_brl_lock_windows
,
1126 .brl_unlock_windows_fn
= skel_brl_unlock_windows
,
1127 .strict_lock_check_fn
= skel_strict_lock_check
,
1128 .translate_name_fn
= skel_translate_name
,
1129 .fsctl_fn
= skel_fsctl
,
1130 .readdir_attr_fn
= skel_readdir_attr
,
1131 .audit_file_fn
= skel_audit_file
,
1133 /* DOS attributes. */
1134 .get_dos_attributes_fn
= skel_get_dos_attributes
,
1135 .get_dos_attributes_send_fn
= skel_get_dos_attributes_send
,
1136 .get_dos_attributes_recv_fn
= skel_get_dos_attributes_recv
,
1137 .fget_dos_attributes_fn
= skel_fget_dos_attributes
,
1138 .set_dos_attributes_fn
= skel_set_dos_attributes
,
1139 .fset_dos_attributes_fn
= skel_fset_dos_attributes
,
1141 /* NT ACL operations. */
1143 .fget_nt_acl_fn
= skel_fget_nt_acl
,
1144 .get_nt_acl_fn
= skel_get_nt_acl
,
1145 .fset_nt_acl_fn
= skel_fset_nt_acl
,
1147 /* POSIX ACL operations. */
1149 .sys_acl_get_file_fn
= skel_sys_acl_get_file
,
1150 .sys_acl_get_fd_fn
= skel_sys_acl_get_fd
,
1151 .sys_acl_blob_get_file_fn
= skel_sys_acl_blob_get_file
,
1152 .sys_acl_blob_get_fd_fn
= skel_sys_acl_blob_get_fd
,
1153 .sys_acl_set_file_fn
= skel_sys_acl_set_file
,
1154 .sys_acl_set_fd_fn
= skel_sys_acl_set_fd
,
1155 .sys_acl_delete_def_file_fn
= skel_sys_acl_delete_def_file
,
1157 /* EA operations. */
1158 .getxattr_fn
= skel_getxattr
,
1159 .getxattrat_send_fn
= skel_getxattrat_send
,
1160 .getxattrat_recv_fn
= skel_getxattrat_recv
,
1161 .fgetxattr_fn
= skel_fgetxattr
,
1162 .listxattr_fn
= skel_listxattr
,
1163 .flistxattr_fn
= skel_flistxattr
,
1164 .removexattr_fn
= skel_removexattr
,
1165 .fremovexattr_fn
= skel_fremovexattr
,
1166 .setxattr_fn
= skel_setxattr
,
1167 .fsetxattr_fn
= skel_fsetxattr
,
1169 /* aio operations */
1170 .aio_force_fn
= skel_aio_force
,
1172 /* durable handle operations */
1173 .durable_cookie_fn
= skel_durable_cookie
,
1174 .durable_disconnect_fn
= skel_durable_disconnect
,
1175 .durable_reconnect_fn
= skel_durable_reconnect
,
1179 NTSTATUS
vfs_skel_opaque_init(TALLOC_CTX
*ctx
)
1182 * smb_vfs_assert_all_fns() makes sure every
1183 * call is implemented.
1185 * An opaque module requires this!
1187 smb_vfs_assert_all_fns(&skel_opaque_fns
, "skel_opaque");
1188 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION
, "skel_opaque",