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 struct files_struct
*dirfsp
,
165 static void skel_rewind_dir(vfs_handle_struct
*handle
, DIR *dirp
)
170 static int skel_mkdirat(vfs_handle_struct
*handle
,
171 struct files_struct
*dirfsp
,
172 const struct smb_filename
*smb_fname
,
179 static int skel_closedir(vfs_handle_struct
*handle
, DIR *dir
)
185 static int skel_openat(struct vfs_handle_struct
*handle
,
186 const struct files_struct
*dirfsp
,
187 const struct smb_filename
*smb_fname
,
188 struct files_struct
*fsp
,
189 const struct vfs_open_how
*how
)
191 if (how
->resolve
!= 0) {
200 static NTSTATUS
skel_create_file(struct vfs_handle_struct
*handle
,
201 struct smb_request
*req
,
202 struct files_struct
*dirfsp
,
203 struct smb_filename
*smb_fname
,
204 uint32_t access_mask
,
205 uint32_t share_access
,
206 uint32_t create_disposition
,
207 uint32_t create_options
,
208 uint32_t file_attributes
,
209 uint32_t oplock_request
,
210 const struct smb2_lease
*lease
,
211 uint64_t allocation_size
,
212 uint32_t private_flags
,
213 struct security_descriptor
*sd
,
214 struct ea_list
*ea_list
,
215 files_struct
**result
, int *pinfo
,
216 const struct smb2_create_blobs
*in_context_blobs
,
217 struct smb2_create_blobs
*out_context_blobs
)
219 return NT_STATUS_NOT_IMPLEMENTED
;
222 static int skel_close_fn(vfs_handle_struct
*handle
, files_struct
*fsp
)
228 static ssize_t
skel_pread(vfs_handle_struct
*handle
, files_struct
*fsp
,
229 void *data
, size_t n
, off_t offset
)
235 static struct tevent_req
*skel_pread_send(struct vfs_handle_struct
*handle
,
237 struct tevent_context
*ev
,
238 struct files_struct
*fsp
,
239 void *data
, size_t n
, off_t offset
)
244 static ssize_t
skel_pread_recv(struct tevent_req
*req
,
245 struct vfs_aio_state
*vfs_aio_state
)
247 vfs_aio_state
->error
= ENOSYS
;
251 static ssize_t
skel_pwrite(vfs_handle_struct
*handle
, files_struct
*fsp
,
252 const void *data
, size_t n
, off_t offset
)
258 static struct tevent_req
*skel_pwrite_send(struct vfs_handle_struct
*handle
,
260 struct tevent_context
*ev
,
261 struct files_struct
*fsp
,
263 size_t n
, off_t offset
)
268 static ssize_t
skel_pwrite_recv(struct tevent_req
*req
,
269 struct vfs_aio_state
*vfs_aio_state
)
271 vfs_aio_state
->error
= ENOSYS
;
275 static off_t
skel_lseek(vfs_handle_struct
*handle
, files_struct
*fsp
,
276 off_t offset
, int whence
)
282 static ssize_t
skel_sendfile(vfs_handle_struct
*handle
, int tofd
,
283 files_struct
*fromfsp
, const DATA_BLOB
*hdr
,
284 off_t offset
, size_t n
)
290 static ssize_t
skel_recvfile(vfs_handle_struct
*handle
, int fromfd
,
291 files_struct
*tofsp
, off_t offset
, size_t n
)
297 static int skel_renameat(vfs_handle_struct
*handle
,
298 files_struct
*srcfsp
,
299 const struct smb_filename
*smb_fname_src
,
300 files_struct
*dstfsp
,
301 const struct smb_filename
*smb_fname_dst
)
307 static struct tevent_req
*skel_fsync_send(struct vfs_handle_struct
*handle
,
309 struct tevent_context
*ev
,
310 struct files_struct
*fsp
)
315 static int skel_fsync_recv(struct tevent_req
*req
,
316 struct vfs_aio_state
*vfs_aio_state
)
318 vfs_aio_state
->error
= ENOSYS
;
322 static int skel_stat(vfs_handle_struct
*handle
, struct smb_filename
*smb_fname
)
328 static int skel_fstat(vfs_handle_struct
*handle
, files_struct
*fsp
,
329 SMB_STRUCT_STAT
*sbuf
)
335 static int skel_lstat(vfs_handle_struct
*handle
,
336 struct smb_filename
*smb_fname
)
342 static int skel_fstatat(
343 struct vfs_handle_struct
*handle
,
344 const struct files_struct
*dirfsp
,
345 const struct smb_filename
*smb_fname
,
346 SMB_STRUCT_STAT
*sbuf
,
353 static uint64_t skel_get_alloc_size(struct vfs_handle_struct
*handle
,
354 struct files_struct
*fsp
,
355 const SMB_STRUCT_STAT
*sbuf
)
361 static int skel_unlinkat(vfs_handle_struct
*handle
,
362 struct files_struct
*dirfsp
,
363 const struct smb_filename
*smb_fname
,
370 static int skel_fchmod(vfs_handle_struct
*handle
, files_struct
*fsp
,
377 static int skel_fchown(vfs_handle_struct
*handle
, files_struct
*fsp
,
378 uid_t uid
, gid_t gid
)
384 static int skel_lchown(vfs_handle_struct
*handle
,
385 const struct smb_filename
*smb_fname
,
393 static int skel_chdir(vfs_handle_struct
*handle
,
394 const struct smb_filename
*smb_fname
)
400 static struct smb_filename
*skel_getwd(vfs_handle_struct
*handle
,
407 static int skel_fntimes(vfs_handle_struct
*handle
,
409 struct smb_file_time
*ft
)
415 static int skel_ftruncate(vfs_handle_struct
*handle
, files_struct
*fsp
,
422 static int skel_fallocate(vfs_handle_struct
*handle
, files_struct
*fsp
,
423 uint32_t mode
, off_t offset
, off_t len
)
429 static bool skel_lock(vfs_handle_struct
*handle
, files_struct
*fsp
, int op
,
430 off_t offset
, off_t count
, int type
)
436 static int skel_filesystem_sharemode(struct vfs_handle_struct
*handle
,
437 struct files_struct
*fsp
,
439 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 const struct 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_fchflags(vfs_handle_struct
*handle
,
516 struct files_struct
*fsp
,
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
,
570 DATA_BLOB
*_token_blob
)
574 if (tevent_req_is_nterror(req
, &status
)) {
575 tevent_req_received(req
);
578 tevent_req_received(req
);
583 struct skel_cc_state
{
586 static struct tevent_req
*skel_offload_write_send(struct vfs_handle_struct
*handle
,
588 struct tevent_context
*ev
,
591 off_t transfer_offset
,
592 struct files_struct
*dest_fsp
,
596 struct tevent_req
*req
;
597 struct skel_cc_state
*cc_state
;
599 req
= tevent_req_create(mem_ctx
, &cc_state
, struct skel_cc_state
);
604 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
605 return tevent_req_post(req
, ev
);
608 static NTSTATUS
skel_offload_write_recv(struct vfs_handle_struct
*handle
,
609 struct tevent_req
*req
,
614 if (tevent_req_is_nterror(req
, &status
)) {
615 tevent_req_received(req
);
618 tevent_req_received(req
);
623 static NTSTATUS
skel_fget_compression(struct vfs_handle_struct
*handle
,
625 struct files_struct
*fsp
,
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_fstreaminfo(struct vfs_handle_struct
*handle
,
640 struct files_struct
*fsp
,
642 unsigned int *num_streams
,
643 struct stream_struct
**streams
)
645 return NT_STATUS_NOT_IMPLEMENTED
;
648 static NTSTATUS
skel_get_real_filename_at(struct vfs_handle_struct
*handle
,
649 struct files_struct
*dirfsp
,
654 return NT_STATUS_NOT_IMPLEMENTED
;
657 static const char *skel_connectpath(
658 struct vfs_handle_struct
*handle
,
659 const struct files_struct
*dirfsp
,
660 const struct smb_filename
*smb_fname
)
666 static NTSTATUS
skel_brl_lock_windows(struct vfs_handle_struct
*handle
,
667 struct byte_range_lock
*br_lck
,
668 struct lock_struct
*plock
)
670 return NT_STATUS_NOT_IMPLEMENTED
;
673 static bool skel_brl_unlock_windows(struct vfs_handle_struct
*handle
,
674 struct byte_range_lock
*br_lck
,
675 const struct lock_struct
*plock
)
681 static bool skel_strict_lock_check(struct vfs_handle_struct
*handle
,
682 struct files_struct
*fsp
,
683 struct lock_struct
*plock
)
689 static NTSTATUS
skel_translate_name(struct vfs_handle_struct
*handle
,
690 const char *mapped_name
,
691 enum vfs_translate_direction direction
,
692 TALLOC_CTX
*mem_ctx
, char **pmapped_name
)
694 return NT_STATUS_NOT_IMPLEMENTED
;
697 static NTSTATUS
skel_parent_pathname(struct vfs_handle_struct
*handle
,
699 const struct smb_filename
*smb_fname_in
,
700 struct smb_filename
**parent_dir_out
,
701 struct smb_filename
**atname_out
)
703 return NT_STATUS_NOT_IMPLEMENTED
;
706 static NTSTATUS
skel_fsctl(struct vfs_handle_struct
*handle
,
707 struct files_struct
*fsp
,
710 uint16_t req_flags
, /* Needed for UNICODE ... */
711 const uint8_t *_in_data
,
714 uint32_t max_out_len
, uint32_t *out_len
)
716 return NT_STATUS_NOT_IMPLEMENTED
;
719 static NTSTATUS
skel_freaddir_attr(struct vfs_handle_struct
*handle
,
720 struct files_struct
*fsp
,
722 struct readdir_attr_data
**pattr_data
)
724 return NT_STATUS_NOT_IMPLEMENTED
;
727 struct skel_get_dos_attributes_state
{
728 struct vfs_aio_state aio_state
;
732 static struct tevent_req
*skel_get_dos_attributes_send(
734 struct tevent_context
*ev
,
735 struct vfs_handle_struct
*handle
,
736 files_struct
*dir_fsp
,
737 struct smb_filename
*smb_fname
)
739 struct tevent_req
*req
= NULL
;
740 struct skel_get_dos_attributes_state
*state
= NULL
;
742 req
= tevent_req_create(mem_ctx
, &state
,
743 struct skel_get_dos_attributes_state
);
748 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
749 return tevent_req_post(req
, ev
);
752 static NTSTATUS
skel_get_dos_attributes_recv(struct tevent_req
*req
,
753 struct vfs_aio_state
*aio_state
,
756 struct skel_get_dos_attributes_state
*state
=
758 struct skel_get_dos_attributes_state
);
761 if (tevent_req_is_nterror(req
, &status
)) {
762 tevent_req_received(req
);
766 *aio_state
= state
->aio_state
;
767 *dosmode
= state
->dosmode
;
768 tevent_req_received(req
);
772 static NTSTATUS
skel_fget_dos_attributes(struct vfs_handle_struct
*handle
,
773 struct files_struct
*fsp
,
776 return NT_STATUS_NOT_IMPLEMENTED
;
779 static NTSTATUS
skel_fset_dos_attributes(struct vfs_handle_struct
*handle
,
780 struct files_struct
*fsp
,
783 return NT_STATUS_NOT_IMPLEMENTED
;
786 static NTSTATUS
skel_fget_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
787 uint32_t security_info
,
789 struct security_descriptor
**ppdesc
)
791 return NT_STATUS_NOT_IMPLEMENTED
;
794 static NTSTATUS
skel_fset_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
795 uint32_t security_info_sent
,
796 const struct security_descriptor
*psd
)
798 return NT_STATUS_NOT_IMPLEMENTED
;
801 static SMB_ACL_T
skel_sys_acl_get_fd(vfs_handle_struct
*handle
,
807 return (SMB_ACL_T
) NULL
;
810 static int skel_sys_acl_blob_get_fd(vfs_handle_struct
*handle
,
811 files_struct
*fsp
, TALLOC_CTX
*mem_ctx
,
812 char **blob_description
, DATA_BLOB
*blob
)
818 static int skel_sys_acl_set_fd(vfs_handle_struct
*handle
,
819 struct files_struct
*fsp
,
827 static int skel_sys_acl_delete_def_fd(vfs_handle_struct
*handle
,
828 struct files_struct
*fsp
)
834 struct skel_getxattrat_state
{
835 struct vfs_aio_state aio_state
;
837 uint8_t *xattr_value
;
840 static struct tevent_req
*skel_getxattrat_send(
842 struct tevent_context
*ev
,
843 struct vfs_handle_struct
*handle
,
844 files_struct
*dir_fsp
,
845 const struct smb_filename
*smb_fname
,
846 const char *xattr_name
,
849 struct tevent_req
*req
= NULL
;
850 struct skel_getxattrat_state
*state
= NULL
;
852 req
= tevent_req_create(mem_ctx
, &state
,
853 struct skel_getxattrat_state
);
858 tevent_req_error(req
, ENOSYS
);
859 return tevent_req_post(req
, ev
);
862 static ssize_t
skel_getxattrat_recv(struct tevent_req
*req
,
863 struct vfs_aio_state
*aio_state
,
865 uint8_t **xattr_value
)
867 struct skel_getxattrat_state
*state
= tevent_req_data(
868 req
, struct skel_getxattrat_state
);
871 if (tevent_req_is_unix_error(req
, &aio_state
->error
)) {
872 tevent_req_received(req
);
876 *aio_state
= state
->aio_state
;
877 xattr_size
= state
->xattr_size
;
878 if (xattr_value
!= NULL
) {
879 *xattr_value
= talloc_move(mem_ctx
, &state
->xattr_value
);
882 tevent_req_received(req
);
886 static ssize_t
skel_fgetxattr(vfs_handle_struct
*handle
,
887 struct files_struct
*fsp
, const char *name
,
888 void *value
, size_t size
)
894 static ssize_t
skel_flistxattr(vfs_handle_struct
*handle
,
895 struct files_struct
*fsp
, char *list
,
902 static int skel_fremovexattr(vfs_handle_struct
*handle
,
903 struct files_struct
*fsp
, const char *name
)
909 static int skel_fsetxattr(vfs_handle_struct
*handle
, struct files_struct
*fsp
,
910 const char *name
, const void *value
, size_t size
,
917 static bool skel_aio_force(struct vfs_handle_struct
*handle
,
918 struct files_struct
*fsp
)
924 static NTSTATUS
skel_audit_file(struct vfs_handle_struct
*handle
,
925 struct smb_filename
*file
,
926 struct security_acl
*sacl
,
927 uint32_t access_requested
,
928 uint32_t access_denied
)
930 return NT_STATUS_NOT_IMPLEMENTED
;
933 static NTSTATUS
skel_durable_cookie(struct vfs_handle_struct
*handle
,
934 struct files_struct
*fsp
,
938 return NT_STATUS_NOT_IMPLEMENTED
;
941 static NTSTATUS
skel_durable_disconnect(struct vfs_handle_struct
*handle
,
942 struct files_struct
*fsp
,
943 const DATA_BLOB old_cookie
,
945 DATA_BLOB
*new_cookie
)
947 return NT_STATUS_NOT_IMPLEMENTED
;
950 static NTSTATUS
skel_durable_reconnect(struct vfs_handle_struct
*handle
,
951 struct smb_request
*smb1req
,
952 struct smbXsrv_open
*op
,
953 const DATA_BLOB old_cookie
,
955 struct files_struct
**fsp
,
956 DATA_BLOB
*new_cookie
)
958 return NT_STATUS_NOT_IMPLEMENTED
;
961 /* VFS operations structure */
963 static struct vfs_fn_pointers skel_opaque_fns
= {
964 /* Disk operations */
966 .connect_fn
= skel_connect
,
967 .disconnect_fn
= skel_disconnect
,
968 .disk_free_fn
= skel_disk_free
,
969 .get_quota_fn
= skel_get_quota
,
970 .set_quota_fn
= skel_set_quota
,
971 .get_shadow_copy_data_fn
= skel_get_shadow_copy_data
,
972 .statvfs_fn
= skel_statvfs
,
973 .fs_capabilities_fn
= skel_fs_capabilities
,
974 .get_dfs_referrals_fn
= skel_get_dfs_referrals
,
975 .create_dfs_pathat_fn
= skel_create_dfs_pathat
,
976 .read_dfs_pathat_fn
= skel_read_dfs_pathat
,
977 .snap_check_path_fn
= skel_snap_check_path
,
978 .snap_create_fn
= skel_snap_create
,
979 .snap_delete_fn
= skel_snap_delete
,
981 /* Directory operations */
983 .fdopendir_fn
= skel_fdopendir
,
984 .readdir_fn
= skel_readdir
,
985 .rewind_dir_fn
= skel_rewind_dir
,
986 .mkdirat_fn
= skel_mkdirat
,
987 .closedir_fn
= skel_closedir
,
989 /* File operations */
991 .openat_fn
= skel_openat
,
992 .create_file_fn
= skel_create_file
,
993 .close_fn
= skel_close_fn
,
994 .pread_fn
= skel_pread
,
995 .pread_send_fn
= skel_pread_send
,
996 .pread_recv_fn
= skel_pread_recv
,
997 .pwrite_fn
= skel_pwrite
,
998 .pwrite_send_fn
= skel_pwrite_send
,
999 .pwrite_recv_fn
= skel_pwrite_recv
,
1000 .lseek_fn
= skel_lseek
,
1001 .sendfile_fn
= skel_sendfile
,
1002 .recvfile_fn
= skel_recvfile
,
1003 .renameat_fn
= skel_renameat
,
1004 .fsync_send_fn
= skel_fsync_send
,
1005 .fsync_recv_fn
= skel_fsync_recv
,
1006 .stat_fn
= skel_stat
,
1007 .fstat_fn
= skel_fstat
,
1008 .lstat_fn
= skel_lstat
,
1009 .fstatat_fn
= skel_fstatat
,
1010 .get_alloc_size_fn
= skel_get_alloc_size
,
1011 .unlinkat_fn
= skel_unlinkat
,
1012 .fchmod_fn
= skel_fchmod
,
1013 .fchown_fn
= skel_fchown
,
1014 .lchown_fn
= skel_lchown
,
1015 .chdir_fn
= skel_chdir
,
1016 .getwd_fn
= skel_getwd
,
1017 .fntimes_fn
= skel_fntimes
,
1018 .ftruncate_fn
= skel_ftruncate
,
1019 .fallocate_fn
= skel_fallocate
,
1020 .lock_fn
= skel_lock
,
1021 .filesystem_sharemode_fn
= skel_filesystem_sharemode
,
1022 .fcntl_fn
= skel_fcntl
,
1023 .linux_setlease_fn
= skel_linux_setlease
,
1024 .getlock_fn
= skel_getlock
,
1025 .symlinkat_fn
= skel_symlinkat
,
1026 .readlinkat_fn
= skel_vfs_readlinkat
,
1027 .linkat_fn
= skel_linkat
,
1028 .mknodat_fn
= skel_mknodat
,
1029 .realpath_fn
= skel_realpath
,
1030 .fchflags_fn
= skel_fchflags
,
1031 .file_id_create_fn
= skel_file_id_create
,
1032 .fs_file_id_fn
= skel_fs_file_id
,
1033 .offload_read_send_fn
= skel_offload_read_send
,
1034 .offload_read_recv_fn
= skel_offload_read_recv
,
1035 .offload_write_send_fn
= skel_offload_write_send
,
1036 .offload_write_recv_fn
= skel_offload_write_recv
,
1037 .fget_compression_fn
= skel_fget_compression
,
1038 .set_compression_fn
= skel_set_compression
,
1040 .fstreaminfo_fn
= skel_fstreaminfo
,
1041 .get_real_filename_at_fn
= skel_get_real_filename_at
,
1042 .connectpath_fn
= skel_connectpath
,
1043 .brl_lock_windows_fn
= skel_brl_lock_windows
,
1044 .brl_unlock_windows_fn
= skel_brl_unlock_windows
,
1045 .strict_lock_check_fn
= skel_strict_lock_check
,
1046 .translate_name_fn
= skel_translate_name
,
1047 .parent_pathname_fn
= skel_parent_pathname
,
1048 .fsctl_fn
= skel_fsctl
,
1049 .freaddir_attr_fn
= skel_freaddir_attr
,
1050 .audit_file_fn
= skel_audit_file
,
1052 /* DOS attributes. */
1053 .get_dos_attributes_send_fn
= skel_get_dos_attributes_send
,
1054 .get_dos_attributes_recv_fn
= skel_get_dos_attributes_recv
,
1055 .fget_dos_attributes_fn
= skel_fget_dos_attributes
,
1056 .fset_dos_attributes_fn
= skel_fset_dos_attributes
,
1058 /* NT ACL operations. */
1060 .fget_nt_acl_fn
= skel_fget_nt_acl
,
1061 .fset_nt_acl_fn
= skel_fset_nt_acl
,
1063 /* POSIX ACL operations. */
1065 .sys_acl_get_fd_fn
= skel_sys_acl_get_fd
,
1066 .sys_acl_blob_get_fd_fn
= skel_sys_acl_blob_get_fd
,
1067 .sys_acl_set_fd_fn
= skel_sys_acl_set_fd
,
1068 .sys_acl_delete_def_fd_fn
= skel_sys_acl_delete_def_fd
,
1070 /* EA operations. */
1071 .getxattrat_send_fn
= skel_getxattrat_send
,
1072 .getxattrat_recv_fn
= skel_getxattrat_recv
,
1073 .fgetxattr_fn
= skel_fgetxattr
,
1074 .flistxattr_fn
= skel_flistxattr
,
1075 .fremovexattr_fn
= skel_fremovexattr
,
1076 .fsetxattr_fn
= skel_fsetxattr
,
1078 /* aio operations */
1079 .aio_force_fn
= skel_aio_force
,
1081 /* durable handle operations */
1082 .durable_cookie_fn
= skel_durable_cookie
,
1083 .durable_disconnect_fn
= skel_durable_disconnect
,
1084 .durable_reconnect_fn
= skel_durable_reconnect
,
1088 NTSTATUS
vfs_skel_opaque_init(TALLOC_CTX
*ctx
)
1091 * smb_vfs_assert_all_fns() makes sure every
1092 * call is implemented.
1094 * An opaque module requires this!
1096 smb_vfs_assert_all_fns(&skel_opaque_fns
, "skel_opaque");
1097 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION
, "skel_opaque",