s3:secrets: replace secrets_delete_prev_machine_password() by secrets_delete()
[Samba.git] / examples / VFS / skel_opaque.c
blobd5c468ebd994043fa542828ef084e84a4dda2210
1 /*
2 * Skeleton VFS module. Implements dummy versions of all VFS
3 * functions.
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_ntstatus.h"
27 /* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE
28 SAMBA DEVELOPERS GUIDE!!!!!!
31 /* If you take this file as template for your module
32 * you must re-implement every function.
35 static int skel_connect(vfs_handle_struct *handle, const char *service,
36 const char *user)
38 errno = ENOSYS;
39 return -1;
42 static void skel_disconnect(vfs_handle_struct *handle)
47 static uint64_t skel_disk_free(vfs_handle_struct *handle,
48 const struct smb_filename *smb_fname,
49 uint64_t *bsize,
50 uint64_t *dfree,
51 uint64_t *dsize)
53 *bsize = 0;
54 *dfree = 0;
55 *dsize = 0;
56 return 0;
59 static int skel_get_quota(vfs_handle_struct *handle,
60 const struct smb_filename *smb_fname,
61 enum SMB_QUOTA_TYPE qtype,
62 unid_t id,
63 SMB_DISK_QUOTA *dq)
65 errno = ENOSYS;
66 return -1;
69 static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
70 unid_t id, SMB_DISK_QUOTA *dq)
72 errno = ENOSYS;
73 return -1;
76 static int skel_get_shadow_copy_data(vfs_handle_struct *handle,
77 files_struct *fsp,
78 struct shadow_copy_data *shadow_copy_data,
79 bool labels)
81 errno = ENOSYS;
82 return -1;
85 static int skel_statvfs(struct vfs_handle_struct *handle,
86 const struct smb_filename *smb_fname,
87 struct vfs_statvfs_struct *statbuf)
89 errno = ENOSYS;
90 return -1;
93 static uint32_t skel_fs_capabilities(struct vfs_handle_struct *handle,
94 enum timestamp_set_resolution *p_ts_res)
96 return 0;
99 static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
100 struct dfs_GetDFSReferral *r)
102 return NT_STATUS_NOT_IMPLEMENTED;
105 static DIR *skel_opendir(vfs_handle_struct *handle,
106 const struct smb_filename *smb_fname,
107 const char *mask,
108 uint32_t attr)
110 return NULL;
113 static NTSTATUS skel_snap_check_path(struct vfs_handle_struct *handle,
114 TALLOC_CTX *mem_ctx,
115 const char *service_path,
116 char **base_volume)
118 return NT_STATUS_NOT_SUPPORTED;
121 static NTSTATUS skel_snap_create(struct vfs_handle_struct *handle,
122 TALLOC_CTX *mem_ctx,
123 const char *base_volume,
124 time_t *tstamp,
125 bool rw,
126 char **base_path,
127 char **snap_path)
129 return NT_STATUS_NOT_SUPPORTED;
132 static NTSTATUS skel_snap_delete(struct vfs_handle_struct *handle,
133 TALLOC_CTX *mem_ctx,
134 char *base_path,
135 char *snap_path)
137 return NT_STATUS_NOT_SUPPORTED;
140 static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
141 const char *mask, uint32_t attr)
143 return NULL;
146 static struct dirent *skel_readdir(vfs_handle_struct *handle,
147 DIR *dirp, SMB_STRUCT_STAT *sbuf)
149 return NULL;
152 static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
157 static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
159 return (long)-1;
162 static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
167 static int skel_mkdir(vfs_handle_struct *handle,
168 const struct smb_filename *smb_fname,
169 mode_t mode)
171 errno = ENOSYS;
172 return -1;
175 static int skel_rmdir(vfs_handle_struct *handle,
176 const struct smb_filename *smb_fname)
178 errno = ENOSYS;
179 return -1;
182 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
184 errno = ENOSYS;
185 return -1;
188 static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
193 static int skel_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
194 files_struct *fsp, int flags, mode_t mode)
196 errno = ENOSYS;
197 return -1;
200 static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
201 struct smb_request *req,
202 uint16_t root_dir_fid,
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 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)
224 errno = ENOSYS;
225 return -1;
228 static ssize_t skel_vfs_read(vfs_handle_struct *handle, files_struct *fsp,
229 void *data, size_t n)
231 errno = ENOSYS;
232 return -1;
235 static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp,
236 void *data, size_t n, off_t offset)
238 errno = ENOSYS;
239 return -1;
242 static struct tevent_req *skel_pread_send(struct vfs_handle_struct *handle,
243 TALLOC_CTX *mem_ctx,
244 struct tevent_context *ev,
245 struct files_struct *fsp,
246 void *data, size_t n, off_t offset)
248 return NULL;
251 static ssize_t skel_pread_recv(struct tevent_req *req,
252 struct vfs_aio_state *vfs_aio_state)
254 vfs_aio_state->error = ENOSYS;
255 return -1;
258 static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp,
259 const void *data, size_t n)
261 errno = ENOSYS;
262 return -1;
265 static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp,
266 const void *data, size_t n, off_t offset)
268 errno = ENOSYS;
269 return -1;
272 static struct tevent_req *skel_pwrite_send(struct vfs_handle_struct *handle,
273 TALLOC_CTX *mem_ctx,
274 struct tevent_context *ev,
275 struct files_struct *fsp,
276 const void *data,
277 size_t n, off_t offset)
279 return NULL;
282 static ssize_t skel_pwrite_recv(struct tevent_req *req,
283 struct vfs_aio_state *vfs_aio_state)
285 vfs_aio_state->error = ENOSYS;
286 return -1;
289 static off_t skel_lseek(vfs_handle_struct *handle, files_struct *fsp,
290 off_t offset, int whence)
292 errno = ENOSYS;
293 return (off_t) - 1;
296 static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd,
297 files_struct *fromfsp, const DATA_BLOB *hdr,
298 off_t offset, size_t n)
300 errno = ENOSYS;
301 return -1;
304 static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd,
305 files_struct *tofsp, off_t offset, size_t n)
307 errno = ENOSYS;
308 return -1;
311 static int skel_rename(vfs_handle_struct *handle,
312 const struct smb_filename *smb_fname_src,
313 const struct smb_filename *smb_fname_dst)
315 errno = ENOSYS;
316 return -1;
319 static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
321 errno = ENOSYS;
322 return -1;
325 static struct tevent_req *skel_fsync_send(struct vfs_handle_struct *handle,
326 TALLOC_CTX *mem_ctx,
327 struct tevent_context *ev,
328 struct files_struct *fsp)
330 return NULL;
333 static int skel_fsync_recv(struct tevent_req *req,
334 struct vfs_aio_state *vfs_aio_state)
336 vfs_aio_state->error = ENOSYS;
337 return -1;
340 static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
342 errno = ENOSYS;
343 return -1;
346 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp,
347 SMB_STRUCT_STAT *sbuf)
349 errno = ENOSYS;
350 return -1;
353 static int skel_lstat(vfs_handle_struct *handle,
354 struct smb_filename *smb_fname)
356 errno = ENOSYS;
357 return -1;
360 static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle,
361 struct files_struct *fsp,
362 const SMB_STRUCT_STAT *sbuf)
364 errno = ENOSYS;
365 return -1;
368 static int skel_unlink(vfs_handle_struct *handle,
369 const struct smb_filename *smb_fname)
371 errno = ENOSYS;
372 return -1;
375 static int skel_chmod(vfs_handle_struct *handle,
376 const struct smb_filename *smb_fname,
377 mode_t mode)
379 errno = ENOSYS;
380 return -1;
383 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
384 mode_t mode)
386 errno = ENOSYS;
387 return -1;
390 static int skel_chown(vfs_handle_struct *handle,
391 const struct smb_filename *smb_fname,
392 uid_t uid,
393 gid_t gid)
395 errno = ENOSYS;
396 return -1;
399 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp,
400 uid_t uid, gid_t gid)
402 errno = ENOSYS;
403 return -1;
406 static int skel_lchown(vfs_handle_struct *handle,
407 const struct smb_filename *smb_fname,
408 uid_t uid,
409 gid_t gid)
411 errno = ENOSYS;
412 return -1;
415 static int skel_chdir(vfs_handle_struct *handle, const char *path)
417 errno = ENOSYS;
418 return -1;
421 static char *skel_getwd(vfs_handle_struct *handle)
423 errno = ENOSYS;
424 return NULL;
427 static int skel_ntimes(vfs_handle_struct *handle,
428 const struct smb_filename *smb_fname,
429 struct smb_file_time *ft)
431 errno = ENOSYS;
432 return -1;
435 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
436 off_t offset)
438 errno = ENOSYS;
439 return -1;
442 static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
443 uint32_t mode, off_t offset, off_t len)
445 errno = ENOSYS;
446 return -1;
449 static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op,
450 off_t offset, off_t count, int type)
452 errno = ENOSYS;
453 return false;
456 static int skel_kernel_flock(struct vfs_handle_struct *handle,
457 struct files_struct *fsp,
458 uint32_t share_mode, uint32_t access_mask)
460 errno = ENOSYS;
461 return -1;
464 static int skel_linux_setlease(struct vfs_handle_struct *handle,
465 struct files_struct *fsp, int leasetype)
467 errno = ENOSYS;
468 return -1;
471 static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp,
472 off_t *poffset, off_t *pcount, int *ptype,
473 pid_t *ppid)
475 errno = ENOSYS;
476 return false;
479 static int skel_symlink(vfs_handle_struct *handle,
480 const char *link_contents,
481 const struct smb_filename *new_smb_fname)
483 errno = ENOSYS;
484 return -1;
487 static int skel_vfs_readlink(vfs_handle_struct *handle,
488 const struct smb_filename *smb_fname,
489 char *buf,
490 size_t bufsiz)
492 errno = ENOSYS;
493 return -1;
496 static int skel_link(vfs_handle_struct *handle,
497 const struct smb_filename *old_smb_fname,
498 const struct smb_filename *new_smb_fname)
500 errno = ENOSYS;
501 return -1;
504 static int skel_mknod(vfs_handle_struct *handle,
505 const struct smb_filename *smb_fname,
506 mode_t mode,
507 SMB_DEV_T dev)
509 errno = ENOSYS;
510 return -1;
513 static char *skel_realpath(vfs_handle_struct *handle, const char *path)
515 errno = ENOSYS;
516 return NULL;
519 static int skel_chflags(vfs_handle_struct *handle,
520 const struct smb_filename *smb_fname,
521 uint flags)
523 errno = ENOSYS;
524 return -1;
527 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
528 const SMB_STRUCT_STAT *sbuf)
530 struct file_id id;
531 ZERO_STRUCT(id);
532 errno = ENOSYS;
533 return id;
536 struct skel_cc_state {
537 uint64_t unused;
539 static struct tevent_req *skel_copy_chunk_send(struct vfs_handle_struct *handle,
540 TALLOC_CTX *mem_ctx,
541 struct tevent_context *ev,
542 struct files_struct *src_fsp,
543 off_t src_off,
544 struct files_struct *dest_fsp,
545 off_t dest_off,
546 off_t num,
547 uint32_t flags)
549 struct tevent_req *req;
550 struct skel_cc_state *cc_state;
552 req = tevent_req_create(mem_ctx, &cc_state, struct skel_cc_state);
553 if (req == NULL) {
554 return NULL;
557 tevent_req_nterror(req, NT_STATUS_NOT_IMPLEMENTED);
558 return tevent_req_post(req, ev);
561 static NTSTATUS skel_copy_chunk_recv(struct vfs_handle_struct *handle,
562 struct tevent_req *req,
563 off_t *copied)
565 NTSTATUS status;
567 if (tevent_req_is_nterror(req, &status)) {
568 tevent_req_received(req);
569 return status;
571 tevent_req_received(req);
573 return NT_STATUS_OK;
576 static NTSTATUS skel_get_compression(struct vfs_handle_struct *handle,
577 TALLOC_CTX *mem_ctx,
578 struct files_struct *fsp,
579 struct smb_filename *smb_fname,
580 uint16_t *_compression_fmt)
582 return NT_STATUS_INVALID_DEVICE_REQUEST;
585 static NTSTATUS skel_set_compression(struct vfs_handle_struct *handle,
586 TALLOC_CTX *mem_ctx,
587 struct files_struct *fsp,
588 uint16_t compression_fmt)
590 return NT_STATUS_INVALID_DEVICE_REQUEST;
593 static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
594 struct files_struct *fsp,
595 const struct smb_filename *smb_fname,
596 TALLOC_CTX *mem_ctx,
597 unsigned int *num_streams,
598 struct stream_struct **streams)
600 return NT_STATUS_NOT_IMPLEMENTED;
603 static int skel_get_real_filename(struct vfs_handle_struct *handle,
604 const char *path,
605 const char *name,
606 TALLOC_CTX *mem_ctx, char **found_name)
608 errno = ENOSYS;
609 return -1;
612 static const char *skel_connectpath(struct vfs_handle_struct *handle,
613 const char *filename)
615 errno = ENOSYS;
616 return NULL;
619 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
620 struct byte_range_lock *br_lck,
621 struct lock_struct *plock,
622 bool blocking_lock)
624 return NT_STATUS_NOT_IMPLEMENTED;
627 static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
628 struct messaging_context *msg_ctx,
629 struct byte_range_lock *br_lck,
630 const struct lock_struct *plock)
632 errno = ENOSYS;
633 return false;
636 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
637 struct byte_range_lock *br_lck,
638 struct lock_struct *plock)
640 errno = ENOSYS;
641 return false;
644 static bool skel_strict_lock(struct vfs_handle_struct *handle,
645 struct files_struct *fsp,
646 struct lock_struct *plock)
648 errno = ENOSYS;
649 return false;
652 static void skel_strict_unlock(struct vfs_handle_struct *handle,
653 struct files_struct *fsp,
654 struct lock_struct *plock)
659 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
660 const char *mapped_name,
661 enum vfs_translate_direction direction,
662 TALLOC_CTX *mem_ctx, char **pmapped_name)
664 return NT_STATUS_NOT_IMPLEMENTED;
667 static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
668 struct files_struct *fsp,
669 TALLOC_CTX *ctx,
670 uint32_t function,
671 uint16_t req_flags, /* Needed for UNICODE ... */
672 const uint8_t *_in_data,
673 uint32_t in_len,
674 uint8_t **_out_data,
675 uint32_t max_out_len, uint32_t *out_len)
677 return NT_STATUS_NOT_IMPLEMENTED;
680 static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
681 const struct smb_filename *fname,
682 TALLOC_CTX *mem_ctx,
683 struct readdir_attr_data **pattr_data)
685 return NT_STATUS_NOT_IMPLEMENTED;
688 static NTSTATUS skel_get_dos_attributes(struct vfs_handle_struct *handle,
689 struct smb_filename *smb_fname,
690 uint32_t *dosmode)
692 return NT_STATUS_NOT_IMPLEMENTED;
695 static NTSTATUS skel_fget_dos_attributes(struct vfs_handle_struct *handle,
696 struct files_struct *fsp,
697 uint32_t *dosmode)
699 return NT_STATUS_NOT_IMPLEMENTED;
702 static NTSTATUS skel_set_dos_attributes(struct vfs_handle_struct *handle,
703 const struct smb_filename *smb_fname,
704 uint32_t dosmode)
706 return NT_STATUS_NOT_IMPLEMENTED;
709 static NTSTATUS skel_fset_dos_attributes(struct vfs_handle_struct *handle,
710 struct files_struct *fsp,
711 uint32_t dosmode)
713 return NT_STATUS_NOT_IMPLEMENTED;
716 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
717 uint32_t security_info,
718 TALLOC_CTX *mem_ctx,
719 struct security_descriptor **ppdesc)
721 return NT_STATUS_NOT_IMPLEMENTED;
724 static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
725 const struct smb_filename *smb_fname,
726 uint32_t security_info,
727 TALLOC_CTX *mem_ctx,
728 struct security_descriptor **ppdesc)
730 return NT_STATUS_NOT_IMPLEMENTED;
733 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
734 uint32_t security_info_sent,
735 const struct security_descriptor *psd)
737 return NT_STATUS_NOT_IMPLEMENTED;
740 static int skel_chmod_acl(vfs_handle_struct *handle,
741 const struct smb_filename *smb_fname,
742 mode_t mode)
744 errno = ENOSYS;
745 return -1;
748 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
749 mode_t mode)
751 errno = ENOSYS;
752 return -1;
755 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
756 const struct smb_filename *smb_fname,
757 SMB_ACL_TYPE_T type,
758 TALLOC_CTX *mem_ctx)
760 errno = ENOSYS;
761 return (SMB_ACL_T) NULL;
764 static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
765 files_struct *fsp, TALLOC_CTX *mem_ctx)
767 errno = ENOSYS;
768 return (SMB_ACL_T) NULL;
771 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
772 const struct smb_filename *smb_fname,
773 TALLOC_CTX *mem_ctx,
774 char **blob_description,
775 DATA_BLOB *blob)
777 errno = ENOSYS;
778 return -1;
781 static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
782 files_struct *fsp, TALLOC_CTX *mem_ctx,
783 char **blob_description, DATA_BLOB *blob)
785 errno = ENOSYS;
786 return -1;
789 static int skel_sys_acl_set_file(vfs_handle_struct *handle,
790 const struct smb_filename *smb_fname,
791 SMB_ACL_TYPE_T acltype,
792 SMB_ACL_T theacl)
794 errno = ENOSYS;
795 return -1;
798 static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
799 SMB_ACL_T theacl)
801 errno = ENOSYS;
802 return -1;
805 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,
806 const struct smb_filename *smb_fname)
808 errno = ENOSYS;
809 return -1;
812 static ssize_t skel_getxattr(vfs_handle_struct *handle,
813 const struct smb_filename *smb_fname,
814 const char *name,
815 void *value,
816 size_t size)
818 errno = ENOSYS;
819 return -1;
822 static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
823 struct files_struct *fsp, const char *name,
824 void *value, size_t size)
826 errno = ENOSYS;
827 return -1;
830 static ssize_t skel_listxattr(vfs_handle_struct *handle,
831 const struct smb_filename *smb_fname,
832 char *list,
833 size_t size)
835 errno = ENOSYS;
836 return -1;
839 static ssize_t skel_flistxattr(vfs_handle_struct *handle,
840 struct files_struct *fsp, char *list,
841 size_t size)
843 errno = ENOSYS;
844 return -1;
847 static int skel_removexattr(vfs_handle_struct *handle,
848 const struct smb_filename *smb_fname,
849 const char *name)
851 errno = ENOSYS;
852 return -1;
855 static int skel_fremovexattr(vfs_handle_struct *handle,
856 struct files_struct *fsp, const char *name)
858 errno = ENOSYS;
859 return -1;
860 return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
863 static int skel_setxattr(vfs_handle_struct *handle,
864 const struct smb_filename *smb_fname,
865 const char *name,
866 const void *value,
867 size_t size,
868 int flags)
870 errno = ENOSYS;
871 return -1;
874 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,
875 const char *name, const void *value, size_t size,
876 int flags)
878 errno = ENOSYS;
879 return -1;
882 static bool skel_aio_force(struct vfs_handle_struct *handle,
883 struct files_struct *fsp)
885 errno = ENOSYS;
886 return false;
889 /* VFS operations structure */
891 struct vfs_fn_pointers skel_opaque_fns = {
892 /* Disk operations */
894 .connect_fn = skel_connect,
895 .disconnect_fn = skel_disconnect,
896 .disk_free_fn = skel_disk_free,
897 .get_quota_fn = skel_get_quota,
898 .set_quota_fn = skel_set_quota,
899 .get_shadow_copy_data_fn = skel_get_shadow_copy_data,
900 .statvfs_fn = skel_statvfs,
901 .fs_capabilities_fn = skel_fs_capabilities,
902 .get_dfs_referrals_fn = skel_get_dfs_referrals,
903 .snap_check_path_fn = skel_snap_check_path,
904 .snap_create_fn = skel_snap_create,
905 .snap_delete_fn = skel_snap_delete,
907 /* Directory operations */
909 .opendir_fn = skel_opendir,
910 .fdopendir_fn = skel_fdopendir,
911 .readdir_fn = skel_readdir,
912 .seekdir_fn = skel_seekdir,
913 .telldir_fn = skel_telldir,
914 .rewind_dir_fn = skel_rewind_dir,
915 .mkdir_fn = skel_mkdir,
916 .rmdir_fn = skel_rmdir,
917 .closedir_fn = skel_closedir,
918 .init_search_op_fn = skel_init_search_op,
920 /* File operations */
922 .open_fn = skel_open,
923 .create_file_fn = skel_create_file,
924 .close_fn = skel_close_fn,
925 .read_fn = skel_vfs_read,
926 .pread_fn = skel_pread,
927 .pread_send_fn = skel_pread_send,
928 .pread_recv_fn = skel_pread_recv,
929 .write_fn = skel_write,
930 .pwrite_fn = skel_pwrite,
931 .pwrite_send_fn = skel_pwrite_send,
932 .pwrite_recv_fn = skel_pwrite_recv,
933 .lseek_fn = skel_lseek,
934 .sendfile_fn = skel_sendfile,
935 .recvfile_fn = skel_recvfile,
936 .rename_fn = skel_rename,
937 .fsync_fn = skel_fsync,
938 .fsync_send_fn = skel_fsync_send,
939 .fsync_recv_fn = skel_fsync_recv,
940 .stat_fn = skel_stat,
941 .fstat_fn = skel_fstat,
942 .lstat_fn = skel_lstat,
943 .get_alloc_size_fn = skel_get_alloc_size,
944 .unlink_fn = skel_unlink,
945 .chmod_fn = skel_chmod,
946 .fchmod_fn = skel_fchmod,
947 .chown_fn = skel_chown,
948 .fchown_fn = skel_fchown,
949 .lchown_fn = skel_lchown,
950 .chdir_fn = skel_chdir,
951 .getwd_fn = skel_getwd,
952 .ntimes_fn = skel_ntimes,
953 .ftruncate_fn = skel_ftruncate,
954 .fallocate_fn = skel_fallocate,
955 .lock_fn = skel_lock,
956 .kernel_flock_fn = skel_kernel_flock,
957 .linux_setlease_fn = skel_linux_setlease,
958 .getlock_fn = skel_getlock,
959 .symlink_fn = skel_symlink,
960 .readlink_fn = skel_vfs_readlink,
961 .link_fn = skel_link,
962 .mknod_fn = skel_mknod,
963 .realpath_fn = skel_realpath,
964 .chflags_fn = skel_chflags,
965 .file_id_create_fn = skel_file_id_create,
966 .copy_chunk_send_fn = skel_copy_chunk_send,
967 .copy_chunk_recv_fn = skel_copy_chunk_recv,
968 .get_compression_fn = skel_get_compression,
969 .set_compression_fn = skel_set_compression,
971 .streaminfo_fn = skel_streaminfo,
972 .get_real_filename_fn = skel_get_real_filename,
973 .connectpath_fn = skel_connectpath,
974 .brl_lock_windows_fn = skel_brl_lock_windows,
975 .brl_unlock_windows_fn = skel_brl_unlock_windows,
976 .brl_cancel_windows_fn = skel_brl_cancel_windows,
977 .strict_lock_fn = skel_strict_lock,
978 .strict_unlock_fn = skel_strict_unlock,
979 .translate_name_fn = skel_translate_name,
980 .fsctl_fn = skel_fsctl,
981 .readdir_attr_fn = skel_readdir_attr,
983 /* DOS attributes. */
984 .get_dos_attributes_fn = skel_get_dos_attributes,
985 .fget_dos_attributes_fn = skel_fget_dos_attributes,
986 .set_dos_attributes_fn = skel_set_dos_attributes,
987 .fset_dos_attributes_fn = skel_fset_dos_attributes,
989 /* NT ACL operations. */
991 .fget_nt_acl_fn = skel_fget_nt_acl,
992 .get_nt_acl_fn = skel_get_nt_acl,
993 .fset_nt_acl_fn = skel_fset_nt_acl,
995 /* POSIX ACL operations. */
997 .chmod_acl_fn = skel_chmod_acl,
998 .fchmod_acl_fn = skel_fchmod_acl,
1000 .sys_acl_get_file_fn = skel_sys_acl_get_file,
1001 .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
1002 .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
1003 .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
1004 .sys_acl_set_file_fn = skel_sys_acl_set_file,
1005 .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
1006 .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
1008 /* EA operations. */
1009 .getxattr_fn = skel_getxattr,
1010 .fgetxattr_fn = skel_fgetxattr,
1011 .listxattr_fn = skel_listxattr,
1012 .flistxattr_fn = skel_flistxattr,
1013 .removexattr_fn = skel_removexattr,
1014 .fremovexattr_fn = skel_fremovexattr,
1015 .setxattr_fn = skel_setxattr,
1016 .fsetxattr_fn = skel_fsetxattr,
1018 /* aio operations */
1019 .aio_force_fn = skel_aio_force,
1022 static_decl_vfs;
1023 NTSTATUS vfs_skel_opaque_init(TALLOC_CTX *ctx)
1025 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
1026 &skel_opaque_fns);