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
,
200 const struct vfs_open_how
*how
)
202 if (how
->resolve
!= 0) {
211 static NTSTATUS
skel_create_file(struct vfs_handle_struct
*handle
,
212 struct smb_request
*req
,
213 struct files_struct
*dirfsp
,
214 struct smb_filename
*smb_fname
,
215 uint32_t access_mask
,
216 uint32_t share_access
,
217 uint32_t create_disposition
,
218 uint32_t create_options
,
219 uint32_t file_attributes
,
220 uint32_t oplock_request
,
221 const struct smb2_lease
*lease
,
222 uint64_t allocation_size
,
223 uint32_t private_flags
,
224 struct security_descriptor
*sd
,
225 struct ea_list
*ea_list
,
226 files_struct
**result
, int *pinfo
,
227 const struct smb2_create_blobs
*in_context_blobs
,
228 struct smb2_create_blobs
*out_context_blobs
)
230 return NT_STATUS_NOT_IMPLEMENTED
;
233 static int skel_close_fn(vfs_handle_struct
*handle
, files_struct
*fsp
)
239 static ssize_t
skel_pread(vfs_handle_struct
*handle
, files_struct
*fsp
,
240 void *data
, size_t n
, off_t offset
)
246 static struct tevent_req
*skel_pread_send(struct vfs_handle_struct
*handle
,
248 struct tevent_context
*ev
,
249 struct files_struct
*fsp
,
250 void *data
, size_t n
, off_t offset
)
255 static ssize_t
skel_pread_recv(struct tevent_req
*req
,
256 struct vfs_aio_state
*vfs_aio_state
)
258 vfs_aio_state
->error
= ENOSYS
;
262 static ssize_t
skel_pwrite(vfs_handle_struct
*handle
, files_struct
*fsp
,
263 const void *data
, size_t n
, off_t offset
)
269 static struct tevent_req
*skel_pwrite_send(struct vfs_handle_struct
*handle
,
271 struct tevent_context
*ev
,
272 struct files_struct
*fsp
,
274 size_t n
, off_t offset
)
279 static ssize_t
skel_pwrite_recv(struct tevent_req
*req
,
280 struct vfs_aio_state
*vfs_aio_state
)
282 vfs_aio_state
->error
= ENOSYS
;
286 static off_t
skel_lseek(vfs_handle_struct
*handle
, files_struct
*fsp
,
287 off_t offset
, int whence
)
293 static ssize_t
skel_sendfile(vfs_handle_struct
*handle
, int tofd
,
294 files_struct
*fromfsp
, const DATA_BLOB
*hdr
,
295 off_t offset
, size_t n
)
301 static ssize_t
skel_recvfile(vfs_handle_struct
*handle
, int fromfd
,
302 files_struct
*tofsp
, off_t offset
, size_t n
)
308 static int skel_renameat(vfs_handle_struct
*handle
,
309 files_struct
*srcfsp
,
310 const struct smb_filename
*smb_fname_src
,
311 files_struct
*dstfsp
,
312 const struct smb_filename
*smb_fname_dst
)
318 static struct tevent_req
*skel_fsync_send(struct vfs_handle_struct
*handle
,
320 struct tevent_context
*ev
,
321 struct files_struct
*fsp
)
326 static int skel_fsync_recv(struct tevent_req
*req
,
327 struct vfs_aio_state
*vfs_aio_state
)
329 vfs_aio_state
->error
= ENOSYS
;
333 static int skel_stat(vfs_handle_struct
*handle
, struct smb_filename
*smb_fname
)
339 static int skel_fstat(vfs_handle_struct
*handle
, files_struct
*fsp
,
340 SMB_STRUCT_STAT
*sbuf
)
346 static int skel_lstat(vfs_handle_struct
*handle
,
347 struct smb_filename
*smb_fname
)
353 static int skel_fstatat(
354 struct vfs_handle_struct
*handle
,
355 const struct files_struct
*dirfsp
,
356 const struct smb_filename
*smb_fname
,
357 SMB_STRUCT_STAT
*sbuf
,
364 static uint64_t skel_get_alloc_size(struct vfs_handle_struct
*handle
,
365 struct files_struct
*fsp
,
366 const SMB_STRUCT_STAT
*sbuf
)
372 static int skel_unlinkat(vfs_handle_struct
*handle
,
373 struct files_struct
*dirfsp
,
374 const struct smb_filename
*smb_fname
,
381 static int skel_fchmod(vfs_handle_struct
*handle
, files_struct
*fsp
,
388 static int skel_fchown(vfs_handle_struct
*handle
, files_struct
*fsp
,
389 uid_t uid
, gid_t gid
)
395 static int skel_lchown(vfs_handle_struct
*handle
,
396 const struct smb_filename
*smb_fname
,
404 static int skel_chdir(vfs_handle_struct
*handle
,
405 const struct smb_filename
*smb_fname
)
411 static struct smb_filename
*skel_getwd(vfs_handle_struct
*handle
,
418 static int skel_fntimes(vfs_handle_struct
*handle
,
420 struct smb_file_time
*ft
)
426 static int skel_ftruncate(vfs_handle_struct
*handle
, files_struct
*fsp
,
433 static int skel_fallocate(vfs_handle_struct
*handle
, files_struct
*fsp
,
434 uint32_t mode
, off_t offset
, off_t len
)
440 static bool skel_lock(vfs_handle_struct
*handle
, files_struct
*fsp
, int op
,
441 off_t offset
, off_t count
, int type
)
447 static int skel_filesystem_sharemode(struct vfs_handle_struct
*handle
,
448 struct files_struct
*fsp
,
450 uint32_t access_mask
)
456 static int skel_fcntl(struct vfs_handle_struct
*handle
,
457 struct files_struct
*fsp
, int cmd
, va_list cmd_arg
)
463 static int skel_linux_setlease(struct vfs_handle_struct
*handle
,
464 struct files_struct
*fsp
, int leasetype
)
470 static bool skel_getlock(vfs_handle_struct
*handle
, files_struct
*fsp
,
471 off_t
*poffset
, off_t
*pcount
, int *ptype
,
478 static int skel_symlinkat(vfs_handle_struct
*handle
,
479 const struct smb_filename
*link_contents
,
480 struct files_struct
*dirfsp
,
481 const struct smb_filename
*new_smb_fname
)
487 static int skel_vfs_readlinkat(vfs_handle_struct
*handle
,
488 const struct files_struct
*dirfsp
,
489 const struct smb_filename
*smb_fname
,
497 static int skel_linkat(vfs_handle_struct
*handle
,
498 files_struct
*srcfsp
,
499 const struct smb_filename
*old_smb_fname
,
500 files_struct
*dstfsp
,
501 const struct smb_filename
*new_smb_fname
,
508 static int skel_mknodat(vfs_handle_struct
*handle
,
509 files_struct
*dirfsp
,
510 const struct smb_filename
*smb_fname
,
518 static struct smb_filename
*skel_realpath(vfs_handle_struct
*handle
,
520 const struct smb_filename
*smb_fname
)
526 static int skel_fchflags(vfs_handle_struct
*handle
,
527 struct files_struct
*fsp
,
534 static struct file_id
skel_file_id_create(vfs_handle_struct
*handle
,
535 const SMB_STRUCT_STAT
*sbuf
)
543 static uint64_t skel_fs_file_id(vfs_handle_struct
*handle
,
544 const SMB_STRUCT_STAT
*sbuf
)
550 struct skel_offload_read_state
{
554 static struct tevent_req
*skel_offload_read_send(
556 struct tevent_context
*ev
,
557 struct vfs_handle_struct
*handle
,
558 struct files_struct
*fsp
,
564 struct tevent_req
*req
= NULL
;
565 struct skel_offload_read_state
*state
= NULL
;
567 req
= tevent_req_create(mem_ctx
, &state
, struct skel_offload_read_state
);
572 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
573 return tevent_req_post(req
, ev
);
576 static NTSTATUS
skel_offload_read_recv(struct tevent_req
*req
,
577 struct vfs_handle_struct
*handle
,
581 DATA_BLOB
*_token_blob
)
585 if (tevent_req_is_nterror(req
, &status
)) {
586 tevent_req_received(req
);
589 tevent_req_received(req
);
594 struct skel_cc_state
{
597 static struct tevent_req
*skel_offload_write_send(struct vfs_handle_struct
*handle
,
599 struct tevent_context
*ev
,
602 off_t transfer_offset
,
603 struct files_struct
*dest_fsp
,
607 struct tevent_req
*req
;
608 struct skel_cc_state
*cc_state
;
610 req
= tevent_req_create(mem_ctx
, &cc_state
, struct skel_cc_state
);
615 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
616 return tevent_req_post(req
, ev
);
619 static NTSTATUS
skel_offload_write_recv(struct vfs_handle_struct
*handle
,
620 struct tevent_req
*req
,
625 if (tevent_req_is_nterror(req
, &status
)) {
626 tevent_req_received(req
);
629 tevent_req_received(req
);
634 static NTSTATUS
skel_fget_compression(struct vfs_handle_struct
*handle
,
636 struct files_struct
*fsp
,
637 uint16_t *_compression_fmt
)
639 return NT_STATUS_INVALID_DEVICE_REQUEST
;
642 static NTSTATUS
skel_set_compression(struct vfs_handle_struct
*handle
,
644 struct files_struct
*fsp
,
645 uint16_t compression_fmt
)
647 return NT_STATUS_INVALID_DEVICE_REQUEST
;
650 static NTSTATUS
skel_fstreaminfo(struct vfs_handle_struct
*handle
,
651 struct files_struct
*fsp
,
653 unsigned int *num_streams
,
654 struct stream_struct
**streams
)
656 return NT_STATUS_NOT_IMPLEMENTED
;
659 static NTSTATUS
skel_get_real_filename_at(struct vfs_handle_struct
*handle
,
660 struct files_struct
*dirfsp
,
665 return NT_STATUS_NOT_IMPLEMENTED
;
668 static const char *skel_connectpath(
669 struct vfs_handle_struct
*handle
,
670 const struct files_struct
*dirfsp
,
671 const struct smb_filename
*smb_fname
)
677 static NTSTATUS
skel_brl_lock_windows(struct vfs_handle_struct
*handle
,
678 struct byte_range_lock
*br_lck
,
679 struct lock_struct
*plock
)
681 return NT_STATUS_NOT_IMPLEMENTED
;
684 static bool skel_brl_unlock_windows(struct vfs_handle_struct
*handle
,
685 struct byte_range_lock
*br_lck
,
686 const struct lock_struct
*plock
)
692 static bool skel_strict_lock_check(struct vfs_handle_struct
*handle
,
693 struct files_struct
*fsp
,
694 struct lock_struct
*plock
)
700 static NTSTATUS
skel_translate_name(struct vfs_handle_struct
*handle
,
701 const char *mapped_name
,
702 enum vfs_translate_direction direction
,
703 TALLOC_CTX
*mem_ctx
, char **pmapped_name
)
705 return NT_STATUS_NOT_IMPLEMENTED
;
708 static NTSTATUS
skel_parent_pathname(struct vfs_handle_struct
*handle
,
710 const struct smb_filename
*smb_fname_in
,
711 struct smb_filename
**parent_dir_out
,
712 struct smb_filename
**atname_out
)
714 return NT_STATUS_NOT_IMPLEMENTED
;
717 static NTSTATUS
skel_fsctl(struct vfs_handle_struct
*handle
,
718 struct files_struct
*fsp
,
721 uint16_t req_flags
, /* Needed for UNICODE ... */
722 const uint8_t *_in_data
,
725 uint32_t max_out_len
, uint32_t *out_len
)
727 return NT_STATUS_NOT_IMPLEMENTED
;
730 static NTSTATUS
skel_freaddir_attr(struct vfs_handle_struct
*handle
,
731 struct files_struct
*fsp
,
733 struct readdir_attr_data
**pattr_data
)
735 return NT_STATUS_NOT_IMPLEMENTED
;
738 struct skel_get_dos_attributes_state
{
739 struct vfs_aio_state aio_state
;
743 static struct tevent_req
*skel_get_dos_attributes_send(
745 struct tevent_context
*ev
,
746 struct vfs_handle_struct
*handle
,
747 files_struct
*dir_fsp
,
748 struct smb_filename
*smb_fname
)
750 struct tevent_req
*req
= NULL
;
751 struct skel_get_dos_attributes_state
*state
= NULL
;
753 req
= tevent_req_create(mem_ctx
, &state
,
754 struct skel_get_dos_attributes_state
);
759 tevent_req_nterror(req
, NT_STATUS_NOT_IMPLEMENTED
);
760 return tevent_req_post(req
, ev
);
763 static NTSTATUS
skel_get_dos_attributes_recv(struct tevent_req
*req
,
764 struct vfs_aio_state
*aio_state
,
767 struct skel_get_dos_attributes_state
*state
=
769 struct skel_get_dos_attributes_state
);
772 if (tevent_req_is_nterror(req
, &status
)) {
773 tevent_req_received(req
);
777 *aio_state
= state
->aio_state
;
778 *dosmode
= state
->dosmode
;
779 tevent_req_received(req
);
783 static NTSTATUS
skel_fget_dos_attributes(struct vfs_handle_struct
*handle
,
784 struct files_struct
*fsp
,
787 return NT_STATUS_NOT_IMPLEMENTED
;
790 static NTSTATUS
skel_fset_dos_attributes(struct vfs_handle_struct
*handle
,
791 struct files_struct
*fsp
,
794 return NT_STATUS_NOT_IMPLEMENTED
;
797 static NTSTATUS
skel_fget_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
798 uint32_t security_info
,
800 struct security_descriptor
**ppdesc
)
802 return NT_STATUS_NOT_IMPLEMENTED
;
805 static NTSTATUS
skel_fset_nt_acl(vfs_handle_struct
*handle
, files_struct
*fsp
,
806 uint32_t security_info_sent
,
807 const struct security_descriptor
*psd
)
809 return NT_STATUS_NOT_IMPLEMENTED
;
812 static SMB_ACL_T
skel_sys_acl_get_fd(vfs_handle_struct
*handle
,
818 return (SMB_ACL_T
) NULL
;
821 static int skel_sys_acl_blob_get_fd(vfs_handle_struct
*handle
,
822 files_struct
*fsp
, TALLOC_CTX
*mem_ctx
,
823 char **blob_description
, DATA_BLOB
*blob
)
829 static int skel_sys_acl_set_fd(vfs_handle_struct
*handle
,
830 struct files_struct
*fsp
,
838 static int skel_sys_acl_delete_def_fd(vfs_handle_struct
*handle
,
839 struct files_struct
*fsp
)
845 struct skel_getxattrat_state
{
846 struct vfs_aio_state aio_state
;
848 uint8_t *xattr_value
;
851 static struct tevent_req
*skel_getxattrat_send(
853 struct tevent_context
*ev
,
854 struct vfs_handle_struct
*handle
,
855 files_struct
*dir_fsp
,
856 const struct smb_filename
*smb_fname
,
857 const char *xattr_name
,
860 struct tevent_req
*req
= NULL
;
861 struct skel_getxattrat_state
*state
= NULL
;
863 req
= tevent_req_create(mem_ctx
, &state
,
864 struct skel_getxattrat_state
);
869 tevent_req_error(req
, ENOSYS
);
870 return tevent_req_post(req
, ev
);
873 static ssize_t
skel_getxattrat_recv(struct tevent_req
*req
,
874 struct vfs_aio_state
*aio_state
,
876 uint8_t **xattr_value
)
878 struct skel_getxattrat_state
*state
= tevent_req_data(
879 req
, struct skel_getxattrat_state
);
882 if (tevent_req_is_unix_error(req
, &aio_state
->error
)) {
883 tevent_req_received(req
);
887 *aio_state
= state
->aio_state
;
888 xattr_size
= state
->xattr_size
;
889 if (xattr_value
!= NULL
) {
890 *xattr_value
= talloc_move(mem_ctx
, &state
->xattr_value
);
893 tevent_req_received(req
);
897 static ssize_t
skel_fgetxattr(vfs_handle_struct
*handle
,
898 struct files_struct
*fsp
, const char *name
,
899 void *value
, size_t size
)
905 static ssize_t
skel_flistxattr(vfs_handle_struct
*handle
,
906 struct files_struct
*fsp
, char *list
,
913 static int skel_fremovexattr(vfs_handle_struct
*handle
,
914 struct files_struct
*fsp
, const char *name
)
920 static int skel_fsetxattr(vfs_handle_struct
*handle
, struct files_struct
*fsp
,
921 const char *name
, const void *value
, size_t size
,
928 static bool skel_aio_force(struct vfs_handle_struct
*handle
,
929 struct files_struct
*fsp
)
935 static NTSTATUS
skel_audit_file(struct vfs_handle_struct
*handle
,
936 struct smb_filename
*file
,
937 struct security_acl
*sacl
,
938 uint32_t access_requested
,
939 uint32_t access_denied
)
941 return NT_STATUS_NOT_IMPLEMENTED
;
944 static NTSTATUS
skel_durable_cookie(struct vfs_handle_struct
*handle
,
945 struct files_struct
*fsp
,
949 return NT_STATUS_NOT_IMPLEMENTED
;
952 static NTSTATUS
skel_durable_disconnect(struct vfs_handle_struct
*handle
,
953 struct files_struct
*fsp
,
954 const DATA_BLOB old_cookie
,
956 DATA_BLOB
*new_cookie
)
958 return NT_STATUS_NOT_IMPLEMENTED
;
961 static NTSTATUS
skel_durable_reconnect(struct vfs_handle_struct
*handle
,
962 struct smb_request
*smb1req
,
963 struct smbXsrv_open
*op
,
964 const DATA_BLOB old_cookie
,
966 struct files_struct
**fsp
,
967 DATA_BLOB
*new_cookie
)
969 return NT_STATUS_NOT_IMPLEMENTED
;
972 /* VFS operations structure */
974 static struct vfs_fn_pointers skel_opaque_fns
= {
975 /* Disk operations */
977 .connect_fn
= skel_connect
,
978 .disconnect_fn
= skel_disconnect
,
979 .disk_free_fn
= skel_disk_free
,
980 .get_quota_fn
= skel_get_quota
,
981 .set_quota_fn
= skel_set_quota
,
982 .get_shadow_copy_data_fn
= skel_get_shadow_copy_data
,
983 .statvfs_fn
= skel_statvfs
,
984 .fs_capabilities_fn
= skel_fs_capabilities
,
985 .get_dfs_referrals_fn
= skel_get_dfs_referrals
,
986 .create_dfs_pathat_fn
= skel_create_dfs_pathat
,
987 .read_dfs_pathat_fn
= skel_read_dfs_pathat
,
988 .snap_check_path_fn
= skel_snap_check_path
,
989 .snap_create_fn
= skel_snap_create
,
990 .snap_delete_fn
= skel_snap_delete
,
992 /* Directory operations */
994 .fdopendir_fn
= skel_fdopendir
,
995 .readdir_fn
= skel_readdir
,
996 .seekdir_fn
= skel_seekdir
,
997 .telldir_fn
= skel_telldir
,
998 .rewind_dir_fn
= skel_rewind_dir
,
999 .mkdirat_fn
= skel_mkdirat
,
1000 .closedir_fn
= skel_closedir
,
1002 /* File operations */
1004 .openat_fn
= skel_openat
,
1005 .create_file_fn
= skel_create_file
,
1006 .close_fn
= skel_close_fn
,
1007 .pread_fn
= skel_pread
,
1008 .pread_send_fn
= skel_pread_send
,
1009 .pread_recv_fn
= skel_pread_recv
,
1010 .pwrite_fn
= skel_pwrite
,
1011 .pwrite_send_fn
= skel_pwrite_send
,
1012 .pwrite_recv_fn
= skel_pwrite_recv
,
1013 .lseek_fn
= skel_lseek
,
1014 .sendfile_fn
= skel_sendfile
,
1015 .recvfile_fn
= skel_recvfile
,
1016 .renameat_fn
= skel_renameat
,
1017 .fsync_send_fn
= skel_fsync_send
,
1018 .fsync_recv_fn
= skel_fsync_recv
,
1019 .stat_fn
= skel_stat
,
1020 .fstat_fn
= skel_fstat
,
1021 .lstat_fn
= skel_lstat
,
1022 .fstatat_fn
= skel_fstatat
,
1023 .get_alloc_size_fn
= skel_get_alloc_size
,
1024 .unlinkat_fn
= skel_unlinkat
,
1025 .fchmod_fn
= skel_fchmod
,
1026 .fchown_fn
= skel_fchown
,
1027 .lchown_fn
= skel_lchown
,
1028 .chdir_fn
= skel_chdir
,
1029 .getwd_fn
= skel_getwd
,
1030 .fntimes_fn
= skel_fntimes
,
1031 .ftruncate_fn
= skel_ftruncate
,
1032 .fallocate_fn
= skel_fallocate
,
1033 .lock_fn
= skel_lock
,
1034 .filesystem_sharemode_fn
= skel_filesystem_sharemode
,
1035 .fcntl_fn
= skel_fcntl
,
1036 .linux_setlease_fn
= skel_linux_setlease
,
1037 .getlock_fn
= skel_getlock
,
1038 .symlinkat_fn
= skel_symlinkat
,
1039 .readlinkat_fn
= skel_vfs_readlinkat
,
1040 .linkat_fn
= skel_linkat
,
1041 .mknodat_fn
= skel_mknodat
,
1042 .realpath_fn
= skel_realpath
,
1043 .fchflags_fn
= skel_fchflags
,
1044 .file_id_create_fn
= skel_file_id_create
,
1045 .fs_file_id_fn
= skel_fs_file_id
,
1046 .offload_read_send_fn
= skel_offload_read_send
,
1047 .offload_read_recv_fn
= skel_offload_read_recv
,
1048 .offload_write_send_fn
= skel_offload_write_send
,
1049 .offload_write_recv_fn
= skel_offload_write_recv
,
1050 .fget_compression_fn
= skel_fget_compression
,
1051 .set_compression_fn
= skel_set_compression
,
1053 .fstreaminfo_fn
= skel_fstreaminfo
,
1054 .get_real_filename_at_fn
= skel_get_real_filename_at
,
1055 .connectpath_fn
= skel_connectpath
,
1056 .brl_lock_windows_fn
= skel_brl_lock_windows
,
1057 .brl_unlock_windows_fn
= skel_brl_unlock_windows
,
1058 .strict_lock_check_fn
= skel_strict_lock_check
,
1059 .translate_name_fn
= skel_translate_name
,
1060 .parent_pathname_fn
= skel_parent_pathname
,
1061 .fsctl_fn
= skel_fsctl
,
1062 .freaddir_attr_fn
= skel_freaddir_attr
,
1063 .audit_file_fn
= skel_audit_file
,
1065 /* DOS attributes. */
1066 .get_dos_attributes_send_fn
= skel_get_dos_attributes_send
,
1067 .get_dos_attributes_recv_fn
= skel_get_dos_attributes_recv
,
1068 .fget_dos_attributes_fn
= skel_fget_dos_attributes
,
1069 .fset_dos_attributes_fn
= skel_fset_dos_attributes
,
1071 /* NT ACL operations. */
1073 .fget_nt_acl_fn
= skel_fget_nt_acl
,
1074 .fset_nt_acl_fn
= skel_fset_nt_acl
,
1076 /* POSIX ACL operations. */
1078 .sys_acl_get_fd_fn
= skel_sys_acl_get_fd
,
1079 .sys_acl_blob_get_fd_fn
= skel_sys_acl_blob_get_fd
,
1080 .sys_acl_set_fd_fn
= skel_sys_acl_set_fd
,
1081 .sys_acl_delete_def_fd_fn
= skel_sys_acl_delete_def_fd
,
1083 /* EA operations. */
1084 .getxattrat_send_fn
= skel_getxattrat_send
,
1085 .getxattrat_recv_fn
= skel_getxattrat_recv
,
1086 .fgetxattr_fn
= skel_fgetxattr
,
1087 .flistxattr_fn
= skel_flistxattr
,
1088 .fremovexattr_fn
= skel_fremovexattr
,
1089 .fsetxattr_fn
= skel_fsetxattr
,
1091 /* aio operations */
1092 .aio_force_fn
= skel_aio_force
,
1094 /* durable handle operations */
1095 .durable_cookie_fn
= skel_durable_cookie
,
1096 .durable_disconnect_fn
= skel_durable_disconnect
,
1097 .durable_reconnect_fn
= skel_durable_reconnect
,
1101 NTSTATUS
vfs_skel_opaque_init(TALLOC_CTX
*ctx
)
1104 * smb_vfs_assert_all_fns() makes sure every
1105 * call is implemented.
1107 * An opaque module requires this!
1109 smb_vfs_assert_all_fns(&skel_opaque_fns
, "skel_opaque");
1110 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION
, "skel_opaque",