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,
161 SMB_STRUCT_STAT *sbuf)
166 static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
171 static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
176 static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
181 static int skel_mkdirat(vfs_handle_struct *handle,
182 struct files_struct *dirfsp,
183 const struct smb_filename *smb_fname,
190 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
196 static int skel_openat(struct vfs_handle_struct *handle,
197 const struct files_struct *dirfsp,
198 const struct smb_filename *smb_fname,
199 struct files_struct *fsp,
207 static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
208 struct smb_request *req,
209 struct smb_filename *smb_fname,
210 uint32_t access_mask,
211 uint32_t share_access,
212 uint32_t create_disposition,
213 uint32_t create_options,
214 uint32_t file_attributes,
215 uint32_t oplock_request,
216 const struct smb2_lease *lease,
217 uint64_t allocation_size,
218 uint32_t private_flags,
219 struct security_descriptor *sd,
220 struct ea_list *ea_list,
221 files_struct **result, int *pinfo,
222 const struct smb2_create_blobs *in_context_blobs,
223 struct smb2_create_blobs *out_context_blobs)
225 return NT_STATUS_NOT_IMPLEMENTED;
228 static int skel_close_fn(vfs_handle_struct *handle, files_struct *fsp)
234 static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp,
235 void *data, size_t n, off_t offset)
241 static struct tevent_req *skel_pread_send(struct vfs_handle_struct *handle,
243 struct tevent_context *ev,
244 struct files_struct *fsp,
245 void *data, size_t n, off_t offset)
250 static ssize_t skel_pread_recv(struct tevent_req *req,
251 struct vfs_aio_state *vfs_aio_state)
253 vfs_aio_state->error = ENOSYS;
257 static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp,
258 const void *data, size_t n, off_t offset)
264 static struct tevent_req *skel_pwrite_send(struct vfs_handle_struct *handle,
266 struct tevent_context *ev,
267 struct files_struct *fsp,
269 size_t n, off_t offset)
274 static ssize_t skel_pwrite_recv(struct tevent_req *req,
275 struct vfs_aio_state *vfs_aio_state)
277 vfs_aio_state->error = ENOSYS;
281 static off_t skel_lseek(vfs_handle_struct *handle, files_struct *fsp,
282 off_t offset, int whence)
288 static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd,
289 files_struct *fromfsp, const DATA_BLOB *hdr,
290 off_t offset, size_t n)
296 static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd,
297 files_struct *tofsp, off_t offset, size_t n)
303 static int skel_renameat(vfs_handle_struct *handle,
304 files_struct *srcfsp,
305 const struct smb_filename *smb_fname_src,
306 files_struct *dstfsp,
307 const struct smb_filename *smb_fname_dst)
313 static struct tevent_req *skel_fsync_send(struct vfs_handle_struct *handle,
315 struct tevent_context *ev,
316 struct files_struct *fsp)
321 static int skel_fsync_recv(struct tevent_req *req,
322 struct vfs_aio_state *vfs_aio_state)
324 vfs_aio_state->error = ENOSYS;
328 static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
334 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp,
335 SMB_STRUCT_STAT *sbuf)
341 static int skel_lstat(vfs_handle_struct *handle,
342 struct smb_filename *smb_fname)
348 static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle,
349 struct files_struct *fsp,
350 const SMB_STRUCT_STAT *sbuf)
356 static int skel_unlinkat(vfs_handle_struct *handle,
357 struct files_struct *dirfsp,
358 const struct smb_filename *smb_fname,
365 static int skel_chmod(vfs_handle_struct *handle,
366 const struct smb_filename *smb_fname,
373 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
380 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp,
381 uid_t uid, gid_t gid)
387 static int skel_lchown(vfs_handle_struct *handle,
388 const struct smb_filename *smb_fname,
396 static int skel_chdir(vfs_handle_struct *handle,
397 const struct smb_filename *smb_fname)
403 static struct smb_filename *skel_getwd(vfs_handle_struct *handle,
410 static int skel_ntimes(vfs_handle_struct *handle,
411 const struct smb_filename *smb_fname,
412 struct smb_file_time *ft)
418 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
425 static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
426 uint32_t mode, off_t offset, off_t len)
432 static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op,
433 off_t offset, off_t count, int type)
439 static int skel_kernel_flock(struct vfs_handle_struct *handle,
440 struct files_struct *fsp,
441 uint32_t share_mode, uint32_t access_mask)
447 static int skel_fcntl(struct vfs_handle_struct *handle,
448 struct files_struct *fsp, int cmd, va_list cmd_arg)
454 static int skel_linux_setlease(struct vfs_handle_struct *handle,
455 struct files_struct *fsp, int leasetype)
461 static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp,
462 off_t *poffset, off_t *pcount, int *ptype,
469 static int skel_symlinkat(vfs_handle_struct *handle,
470 const struct smb_filename *link_contents,
471 struct files_struct *dirfsp,
472 const struct smb_filename *new_smb_fname)
478 static int skel_vfs_readlinkat(vfs_handle_struct *handle,
479 const struct files_struct *dirfsp,
480 const struct smb_filename *smb_fname,
488 static int skel_linkat(vfs_handle_struct *handle,
489 files_struct *srcfsp,
490 const struct smb_filename *old_smb_fname,
491 files_struct *dstfsp,
492 const struct smb_filename *new_smb_fname,
499 static int skel_mknodat(vfs_handle_struct *handle,
500 files_struct *dirfsp,
501 const struct smb_filename *smb_fname,
509 static struct smb_filename *skel_realpath(vfs_handle_struct *handle,
511 const struct smb_filename *smb_fname)
517 static int skel_chflags(vfs_handle_struct *handle,
518 const struct smb_filename *smb_fname,
525 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
526 const SMB_STRUCT_STAT *sbuf)
534 static uint64_t skel_fs_file_id(vfs_handle_struct *handle,
535 const SMB_STRUCT_STAT *sbuf)
541 struct skel_offload_read_state {
545 static struct tevent_req *skel_offload_read_send(
547 struct tevent_context *ev,
548 struct vfs_handle_struct *handle,
549 struct files_struct *fsp,
555 struct tevent_req *req = NULL;
556 struct skel_offload_read_state *state = NULL;
558 req = tevent_req_create(mem_ctx, &state, struct skel_offload_read_state);
563 tevent_req_nterror(req, NT_STATUS_NOT_IMPLEMENTED);
564 return tevent_req_post(req, ev);
567 static NTSTATUS skel_offload_read_recv(struct tevent_req *req,
568 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_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 struct skel_get_dos_attributes_state {
718 struct vfs_aio_state aio_state;
722 static struct tevent_req *skel_get_dos_attributes_send(
724 struct tevent_context *ev,
725 struct vfs_handle_struct *handle,
726 files_struct *dir_fsp,
727 struct smb_filename *smb_fname)
729 struct tevent_req *req = NULL;
730 struct skel_get_dos_attributes_state *state = NULL;
732 req = tevent_req_create(mem_ctx, &state,
733 struct skel_get_dos_attributes_state);
738 tevent_req_nterror(req, NT_STATUS_NOT_IMPLEMENTED);
739 return tevent_req_post(req, ev);
742 static NTSTATUS skel_get_dos_attributes_recv(struct tevent_req *req,
743 struct vfs_aio_state *aio_state,
746 struct skel_get_dos_attributes_state *state =
748 struct skel_get_dos_attributes_state);
751 if (tevent_req_is_nterror(req, &status)) {
752 tevent_req_received(req);
756 *aio_state = state->aio_state;
757 *dosmode = state->dosmode;
758 tevent_req_received(req);
762 static NTSTATUS skel_fget_dos_attributes(struct vfs_handle_struct *handle,
763 struct files_struct *fsp,
766 return NT_STATUS_NOT_IMPLEMENTED;
769 static NTSTATUS skel_fset_dos_attributes(struct vfs_handle_struct *handle,
770 struct files_struct *fsp,
773 return NT_STATUS_NOT_IMPLEMENTED;
776 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
777 uint32_t security_info,
779 struct security_descriptor **ppdesc)
781 return NT_STATUS_NOT_IMPLEMENTED;
784 static NTSTATUS skel_get_nt_acl_at(vfs_handle_struct *handle,
785 struct files_struct *dirfsp,
786 const struct smb_filename *smb_fname,
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_file(vfs_handle_struct *handle,
802 const struct smb_filename *smb_fname,
807 return (SMB_ACL_T) NULL;
810 static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
811 files_struct *fsp, TALLOC_CTX *mem_ctx)
814 return (SMB_ACL_T) NULL;
817 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
818 const struct smb_filename *smb_fname,
820 char **blob_description,
827 static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
828 files_struct *fsp, TALLOC_CTX *mem_ctx,
829 char **blob_description, DATA_BLOB *blob)
835 static int skel_sys_acl_set_fd(vfs_handle_struct *handle,
836 struct files_struct *fsp,
844 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,
845 const struct smb_filename *smb_fname)
851 static ssize_t skel_getxattr(vfs_handle_struct *handle,
852 const struct smb_filename *smb_fname,
861 struct skel_getxattrat_state {
862 struct vfs_aio_state aio_state;
864 uint8_t *xattr_value;
867 static struct tevent_req *skel_getxattrat_send(
869 struct tevent_context *ev,
870 struct vfs_handle_struct *handle,
871 files_struct *dir_fsp,
872 const struct smb_filename *smb_fname,
873 const char *xattr_name,
876 struct tevent_req *req = NULL;
877 struct skel_getxattrat_state *state = NULL;
879 req = tevent_req_create(mem_ctx, &state,
880 struct skel_getxattrat_state);
885 tevent_req_error(req, ENOSYS);
886 return tevent_req_post(req, ev);
889 static ssize_t skel_getxattrat_recv(struct tevent_req *req,
890 struct vfs_aio_state *aio_state,
892 uint8_t **xattr_value)
894 struct skel_getxattrat_state *state = tevent_req_data(
895 req, struct skel_getxattrat_state);
898 if (tevent_req_is_unix_error(req, &aio_state->error)) {
899 tevent_req_received(req);
903 *aio_state = state->aio_state;
904 xattr_size = state->xattr_size;
905 if (xattr_value != NULL) {
906 *xattr_value = talloc_move(mem_ctx, &state->xattr_value);
909 tevent_req_received(req);
913 static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
914 struct files_struct *fsp, const char *name,
915 void *value, size_t size)
921 static ssize_t skel_flistxattr(vfs_handle_struct *handle,
922 struct files_struct *fsp, char *list,
929 static int skel_fremovexattr(vfs_handle_struct *handle,
930 struct files_struct *fsp, const char *name)
936 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,
937 const char *name, const void *value, size_t size,
944 static bool skel_aio_force(struct vfs_handle_struct *handle,
945 struct files_struct *fsp)
951 static NTSTATUS skel_audit_file(struct vfs_handle_struct *handle,
952 struct smb_filename *file,
953 struct security_acl *sacl,
954 uint32_t access_requested,
955 uint32_t access_denied)
957 return NT_STATUS_NOT_IMPLEMENTED;
960 static NTSTATUS skel_durable_cookie(struct vfs_handle_struct *handle,
961 struct files_struct *fsp,
965 return NT_STATUS_NOT_IMPLEMENTED;
968 static NTSTATUS skel_durable_disconnect(struct vfs_handle_struct *handle,
969 struct files_struct *fsp,
970 const DATA_BLOB old_cookie,
972 DATA_BLOB *new_cookie)
974 return NT_STATUS_NOT_IMPLEMENTED;
977 static NTSTATUS skel_durable_reconnect(struct vfs_handle_struct *handle,
978 struct smb_request *smb1req,
979 struct smbXsrv_open *op,
980 const DATA_BLOB old_cookie,
982 struct files_struct **fsp,
983 DATA_BLOB *new_cookie)
985 return NT_STATUS_NOT_IMPLEMENTED;
988 /* VFS operations structure */
990 static struct vfs_fn_pointers skel_opaque_fns = {
991 /* Disk operations */
993 .connect_fn = skel_connect,
994 .disconnect_fn = skel_disconnect,
995 .disk_free_fn = skel_disk_free,
996 .get_quota_fn = skel_get_quota,
997 .set_quota_fn = skel_set_quota,
998 .get_shadow_copy_data_fn = skel_get_shadow_copy_data,
999 .statvfs_fn = skel_statvfs,
1000 .fs_capabilities_fn = skel_fs_capabilities,
1001 .get_dfs_referrals_fn = skel_get_dfs_referrals,
1002 .create_dfs_pathat_fn = skel_create_dfs_pathat,
1003 .read_dfs_pathat_fn = skel_read_dfs_pathat,
1004 .snap_check_path_fn = skel_snap_check_path,
1005 .snap_create_fn = skel_snap_create,
1006 .snap_delete_fn = skel_snap_delete,
1008 /* Directory operations */
1010 .fdopendir_fn = skel_fdopendir,
1011 .readdir_fn = skel_readdir,
1012 .seekdir_fn = skel_seekdir,
1013 .telldir_fn = skel_telldir,
1014 .rewind_dir_fn = skel_rewind_dir,
1015 .mkdirat_fn = skel_mkdirat,
1016 .closedir_fn = skel_closedir,
1018 /* File operations */
1020 .openat_fn = skel_openat,
1021 .create_file_fn = skel_create_file,
1022 .close_fn = skel_close_fn,
1023 .pread_fn = skel_pread,
1024 .pread_send_fn = skel_pread_send,
1025 .pread_recv_fn = skel_pread_recv,
1026 .pwrite_fn = skel_pwrite,
1027 .pwrite_send_fn = skel_pwrite_send,
1028 .pwrite_recv_fn = skel_pwrite_recv,
1029 .lseek_fn = skel_lseek,
1030 .sendfile_fn = skel_sendfile,
1031 .recvfile_fn = skel_recvfile,
1032 .renameat_fn = skel_renameat,
1033 .fsync_send_fn = skel_fsync_send,
1034 .fsync_recv_fn = skel_fsync_recv,
1035 .stat_fn = skel_stat,
1036 .fstat_fn = skel_fstat,
1037 .lstat_fn = skel_lstat,
1038 .get_alloc_size_fn = skel_get_alloc_size,
1039 .unlinkat_fn = skel_unlinkat,
1040 .chmod_fn = skel_chmod,
1041 .fchmod_fn = skel_fchmod,
1042 .fchown_fn = skel_fchown,
1043 .lchown_fn = skel_lchown,
1044 .chdir_fn = skel_chdir,
1045 .getwd_fn = skel_getwd,
1046 .ntimes_fn = skel_ntimes,
1047 .ftruncate_fn = skel_ftruncate,
1048 .fallocate_fn = skel_fallocate,
1049 .lock_fn = skel_lock,
1050 .kernel_flock_fn = skel_kernel_flock,
1051 .fcntl_fn = skel_fcntl,
1052 .linux_setlease_fn = skel_linux_setlease,
1053 .getlock_fn = skel_getlock,
1054 .symlinkat_fn = skel_symlinkat,
1055 .readlinkat_fn = skel_vfs_readlinkat,
1056 .linkat_fn = skel_linkat,
1057 .mknodat_fn = skel_mknodat,
1058 .realpath_fn = skel_realpath,
1059 .chflags_fn = skel_chflags,
1060 .file_id_create_fn = skel_file_id_create,
1061 .fs_file_id_fn = skel_fs_file_id,
1062 .offload_read_send_fn = skel_offload_read_send,
1063 .offload_read_recv_fn = skel_offload_read_recv,
1064 .offload_write_send_fn = skel_offload_write_send,
1065 .offload_write_recv_fn = skel_offload_write_recv,
1066 .fget_compression_fn = skel_fget_compression,
1067 .set_compression_fn = skel_set_compression,
1069 .streaminfo_fn = skel_streaminfo,
1070 .get_real_filename_fn = skel_get_real_filename,
1071 .connectpath_fn = skel_connectpath,
1072 .brl_lock_windows_fn = skel_brl_lock_windows,
1073 .brl_unlock_windows_fn = skel_brl_unlock_windows,
1074 .strict_lock_check_fn = skel_strict_lock_check,
1075 .translate_name_fn = skel_translate_name,
1076 .fsctl_fn = skel_fsctl,
1077 .readdir_attr_fn = skel_readdir_attr,
1078 .audit_file_fn = skel_audit_file,
1080 /* DOS attributes. */
1081 .get_dos_attributes_send_fn = skel_get_dos_attributes_send,
1082 .get_dos_attributes_recv_fn = skel_get_dos_attributes_recv,
1083 .fget_dos_attributes_fn = skel_fget_dos_attributes,
1084 .fset_dos_attributes_fn = skel_fset_dos_attributes,
1086 /* NT ACL operations. */
1088 .fget_nt_acl_fn = skel_fget_nt_acl,
1089 .get_nt_acl_at_fn = skel_get_nt_acl_at,
1090 .fset_nt_acl_fn = skel_fset_nt_acl,
1092 /* POSIX ACL operations. */
1094 .sys_acl_get_file_fn = skel_sys_acl_get_file,
1095 .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
1096 .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
1097 .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
1098 .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
1099 .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
1101 /* EA operations. */
1102 .getxattr_fn = skel_getxattr,
1103 .getxattrat_send_fn = skel_getxattrat_send,
1104 .getxattrat_recv_fn = skel_getxattrat_recv,
1105 .fgetxattr_fn = skel_fgetxattr,
1106 .flistxattr_fn = skel_flistxattr,
1107 .fremovexattr_fn = skel_fremovexattr,
1108 .fsetxattr_fn = skel_fsetxattr,
1110 /* aio operations */
1111 .aio_force_fn = skel_aio_force,
1113 /* durable handle operations */
1114 .durable_cookie_fn = skel_durable_cookie,
1115 .durable_disconnect_fn = skel_durable_disconnect,
1116 .durable_reconnect_fn = skel_durable_reconnect,
1120 NTSTATUS vfs_skel_opaque_init(TALLOC_CTX *ctx)
1123 * smb_vfs_assert_all_fns() makes sure every
1124 * call is implemented.
1126 * An opaque module requires this!
1128 smb_vfs_assert_all_fns(&skel_opaque_fns, "skel_opaque");
1129 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",