s3: VFS: Change SMB_VFS_MKNOD to use const struct smb_filename * instead of const...
[Samba.git] / examples / VFS / skel_opaque.c
blobae0d4dc2b621da26fde90389a06429867ec6c2ce
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, const char *path,
48 uint64_t *bsize,
49 uint64_t *dfree, uint64_t *dsize)
51 *bsize = 0;
52 *dfree = 0;
53 *dsize = 0;
54 return 0;
57 static int skel_get_quota(vfs_handle_struct *handle, const char *path,
58 enum SMB_QUOTA_TYPE qtype, unid_t id,
59 SMB_DISK_QUOTA *dq)
61 errno = ENOSYS;
62 return -1;
65 static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
66 unid_t id, SMB_DISK_QUOTA *dq)
68 errno = ENOSYS;
69 return -1;
72 static int skel_get_shadow_copy_data(vfs_handle_struct *handle,
73 files_struct *fsp,
74 struct shadow_copy_data *shadow_copy_data,
75 bool labels)
77 errno = ENOSYS;
78 return -1;
81 static int skel_statvfs(struct vfs_handle_struct *handle,
82 const char *path, struct vfs_statvfs_struct *statbuf)
84 errno = ENOSYS;
85 return -1;
88 static uint32_t skel_fs_capabilities(struct vfs_handle_struct *handle,
89 enum timestamp_set_resolution *p_ts_res)
91 return 0;
94 static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
95 struct dfs_GetDFSReferral *r)
97 return NT_STATUS_NOT_IMPLEMENTED;
100 static DIR *skel_opendir(vfs_handle_struct *handle,
101 const struct smb_filename *smb_fname,
102 const char *mask,
103 uint32_t attr)
105 return NULL;
108 static NTSTATUS skel_snap_check_path(struct vfs_handle_struct *handle,
109 TALLOC_CTX *mem_ctx,
110 const char *service_path,
111 char **base_volume)
113 return NT_STATUS_NOT_SUPPORTED;
116 static NTSTATUS skel_snap_create(struct vfs_handle_struct *handle,
117 TALLOC_CTX *mem_ctx,
118 const char *base_volume,
119 time_t *tstamp,
120 bool rw,
121 char **base_path,
122 char **snap_path)
124 return NT_STATUS_NOT_SUPPORTED;
127 static NTSTATUS skel_snap_delete(struct vfs_handle_struct *handle,
128 TALLOC_CTX *mem_ctx,
129 char *base_path,
130 char *snap_path)
132 return NT_STATUS_NOT_SUPPORTED;
135 static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
136 const char *mask, uint32_t attr)
138 return NULL;
141 static struct dirent *skel_readdir(vfs_handle_struct *handle,
142 DIR *dirp, SMB_STRUCT_STAT *sbuf)
144 return NULL;
147 static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
152 static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
154 return (long)-1;
157 static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
162 static int skel_mkdir(vfs_handle_struct *handle,
163 const struct smb_filename *smb_fname,
164 mode_t mode)
166 errno = ENOSYS;
167 return -1;
170 static int skel_rmdir(vfs_handle_struct *handle,
171 const struct smb_filename *smb_fname)
173 errno = ENOSYS;
174 return -1;
177 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
179 errno = ENOSYS;
180 return -1;
183 static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
188 static int skel_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
189 files_struct *fsp, int flags, mode_t mode)
191 errno = ENOSYS;
192 return -1;
195 static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
196 struct smb_request *req,
197 uint16_t root_dir_fid,
198 struct smb_filename *smb_fname,
199 uint32_t access_mask,
200 uint32_t share_access,
201 uint32_t create_disposition,
202 uint32_t create_options,
203 uint32_t file_attributes,
204 uint32_t oplock_request,
205 struct smb2_lease *lease,
206 uint64_t allocation_size,
207 uint32_t private_flags,
208 struct security_descriptor *sd,
209 struct ea_list *ea_list,
210 files_struct **result, int *pinfo,
211 const struct smb2_create_blobs *in_context_blobs,
212 struct smb2_create_blobs *out_context_blobs)
214 return NT_STATUS_NOT_IMPLEMENTED;
217 static int skel_close_fn(vfs_handle_struct *handle, files_struct *fsp)
219 errno = ENOSYS;
220 return -1;
223 static ssize_t skel_vfs_read(vfs_handle_struct *handle, files_struct *fsp,
224 void *data, size_t n)
226 errno = ENOSYS;
227 return -1;
230 static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp,
231 void *data, size_t n, off_t offset)
233 errno = ENOSYS;
234 return -1;
237 static struct tevent_req *skel_pread_send(struct vfs_handle_struct *handle,
238 TALLOC_CTX *mem_ctx,
239 struct tevent_context *ev,
240 struct files_struct *fsp,
241 void *data, size_t n, off_t offset)
243 return NULL;
246 static ssize_t skel_pread_recv(struct tevent_req *req,
247 struct vfs_aio_state *vfs_aio_state)
249 vfs_aio_state->error = ENOSYS;
250 return -1;
253 static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp,
254 const void *data, size_t n)
256 errno = ENOSYS;
257 return -1;
260 static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp,
261 const void *data, size_t n, off_t offset)
263 errno = ENOSYS;
264 return -1;
267 static struct tevent_req *skel_pwrite_send(struct vfs_handle_struct *handle,
268 TALLOC_CTX *mem_ctx,
269 struct tevent_context *ev,
270 struct files_struct *fsp,
271 const void *data,
272 size_t n, off_t offset)
274 return NULL;
277 static ssize_t skel_pwrite_recv(struct tevent_req *req,
278 struct vfs_aio_state *vfs_aio_state)
280 vfs_aio_state->error = ENOSYS;
281 return -1;
284 static off_t skel_lseek(vfs_handle_struct *handle, files_struct *fsp,
285 off_t offset, int whence)
287 errno = ENOSYS;
288 return (off_t) - 1;
291 static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd,
292 files_struct *fromfsp, const DATA_BLOB *hdr,
293 off_t offset, size_t n)
295 errno = ENOSYS;
296 return -1;
299 static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd,
300 files_struct *tofsp, off_t offset, size_t n)
302 errno = ENOSYS;
303 return -1;
306 static int skel_rename(vfs_handle_struct *handle,
307 const struct smb_filename *smb_fname_src,
308 const struct smb_filename *smb_fname_dst)
310 errno = ENOSYS;
311 return -1;
314 static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
316 errno = ENOSYS;
317 return -1;
320 static struct tevent_req *skel_fsync_send(struct vfs_handle_struct *handle,
321 TALLOC_CTX *mem_ctx,
322 struct tevent_context *ev,
323 struct files_struct *fsp)
325 return NULL;
328 static int skel_fsync_recv(struct tevent_req *req,
329 struct vfs_aio_state *vfs_aio_state)
331 vfs_aio_state->error = ENOSYS;
332 return -1;
335 static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
337 errno = ENOSYS;
338 return -1;
341 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp,
342 SMB_STRUCT_STAT *sbuf)
344 errno = ENOSYS;
345 return -1;
348 static int skel_lstat(vfs_handle_struct *handle,
349 struct smb_filename *smb_fname)
351 errno = ENOSYS;
352 return -1;
355 static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle,
356 struct files_struct *fsp,
357 const SMB_STRUCT_STAT *sbuf)
359 errno = ENOSYS;
360 return -1;
363 static int skel_unlink(vfs_handle_struct *handle,
364 const struct smb_filename *smb_fname)
366 errno = ENOSYS;
367 return -1;
370 static int skel_chmod(vfs_handle_struct *handle,
371 const struct smb_filename *smb_fname,
372 mode_t mode)
374 errno = ENOSYS;
375 return -1;
378 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
379 mode_t mode)
381 errno = ENOSYS;
382 return -1;
385 static int skel_chown(vfs_handle_struct *handle,
386 const struct smb_filename *smb_fname,
387 uid_t uid,
388 gid_t gid)
390 errno = ENOSYS;
391 return -1;
394 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp,
395 uid_t uid, gid_t gid)
397 errno = ENOSYS;
398 return -1;
401 static int skel_lchown(vfs_handle_struct *handle,
402 const struct smb_filename *smb_fname,
403 uid_t uid,
404 gid_t gid)
406 errno = ENOSYS;
407 return -1;
410 static int skel_chdir(vfs_handle_struct *handle, const char *path)
412 errno = ENOSYS;
413 return -1;
416 static char *skel_getwd(vfs_handle_struct *handle)
418 errno = ENOSYS;
419 return NULL;
422 static int skel_ntimes(vfs_handle_struct *handle,
423 const struct smb_filename *smb_fname,
424 struct smb_file_time *ft)
426 errno = ENOSYS;
427 return -1;
430 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
431 off_t offset)
433 errno = ENOSYS;
434 return -1;
437 static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
438 uint32_t mode, off_t offset, off_t len)
440 errno = ENOSYS;
441 return -1;
444 static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op,
445 off_t offset, off_t count, int type)
447 errno = ENOSYS;
448 return false;
451 static int skel_kernel_flock(struct vfs_handle_struct *handle,
452 struct files_struct *fsp,
453 uint32_t share_mode, uint32_t access_mask)
455 errno = ENOSYS;
456 return -1;
459 static int skel_linux_setlease(struct vfs_handle_struct *handle,
460 struct files_struct *fsp, int leasetype)
462 errno = ENOSYS;
463 return -1;
466 static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp,
467 off_t *poffset, off_t *pcount, int *ptype,
468 pid_t *ppid)
470 errno = ENOSYS;
471 return false;
474 static int skel_symlink(vfs_handle_struct *handle, const char *oldpath,
475 const char *newpath)
477 errno = ENOSYS;
478 return -1;
481 static int skel_vfs_readlink(vfs_handle_struct *handle, const char *path,
482 char *buf, size_t bufsiz)
484 errno = ENOSYS;
485 return -1;
488 static int skel_link(vfs_handle_struct *handle, const char *oldpath,
489 const char *newpath)
491 errno = ENOSYS;
492 return -1;
495 static int skel_mknod(vfs_handle_struct *handle,
496 const struct smb_filename *smb_fname,
497 mode_t mode,
498 SMB_DEV_T dev)
500 errno = ENOSYS;
501 return -1;
504 static char *skel_realpath(vfs_handle_struct *handle, const char *path)
506 errno = ENOSYS;
507 return NULL;
510 static int skel_chflags(vfs_handle_struct *handle, const char *path,
511 uint flags)
513 errno = ENOSYS;
514 return -1;
517 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
518 const SMB_STRUCT_STAT *sbuf)
520 struct file_id id;
521 ZERO_STRUCT(id);
522 errno = ENOSYS;
523 return id;
526 struct skel_cc_state {
527 uint64_t unused;
529 static struct tevent_req *skel_copy_chunk_send(struct vfs_handle_struct *handle,
530 TALLOC_CTX *mem_ctx,
531 struct tevent_context *ev,
532 struct files_struct *src_fsp,
533 off_t src_off,
534 struct files_struct *dest_fsp,
535 off_t dest_off,
536 off_t num,
537 uint32_t flags)
539 struct tevent_req *req;
540 struct skel_cc_state *cc_state;
542 req = tevent_req_create(mem_ctx, &cc_state, struct skel_cc_state);
543 if (req == NULL) {
544 return NULL;
547 tevent_req_nterror(req, NT_STATUS_NOT_IMPLEMENTED);
548 return tevent_req_post(req, ev);
551 static NTSTATUS skel_copy_chunk_recv(struct vfs_handle_struct *handle,
552 struct tevent_req *req,
553 off_t *copied)
555 NTSTATUS status;
557 if (tevent_req_is_nterror(req, &status)) {
558 tevent_req_received(req);
559 return status;
561 tevent_req_received(req);
563 return NT_STATUS_OK;
566 static NTSTATUS skel_get_compression(struct vfs_handle_struct *handle,
567 TALLOC_CTX *mem_ctx,
568 struct files_struct *fsp,
569 struct smb_filename *smb_fname,
570 uint16_t *_compression_fmt)
572 return NT_STATUS_INVALID_DEVICE_REQUEST;
575 static NTSTATUS skel_set_compression(struct vfs_handle_struct *handle,
576 TALLOC_CTX *mem_ctx,
577 struct files_struct *fsp,
578 uint16_t compression_fmt)
580 return NT_STATUS_INVALID_DEVICE_REQUEST;
583 static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
584 struct files_struct *fsp,
585 const struct smb_filename *smb_fname,
586 TALLOC_CTX *mem_ctx,
587 unsigned int *num_streams,
588 struct stream_struct **streams)
590 return NT_STATUS_NOT_IMPLEMENTED;
593 static int skel_get_real_filename(struct vfs_handle_struct *handle,
594 const char *path,
595 const char *name,
596 TALLOC_CTX *mem_ctx, char **found_name)
598 errno = ENOSYS;
599 return -1;
602 static const char *skel_connectpath(struct vfs_handle_struct *handle,
603 const char *filename)
605 errno = ENOSYS;
606 return NULL;
609 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
610 struct byte_range_lock *br_lck,
611 struct lock_struct *plock,
612 bool blocking_lock)
614 return NT_STATUS_NOT_IMPLEMENTED;
617 static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
618 struct messaging_context *msg_ctx,
619 struct byte_range_lock *br_lck,
620 const struct lock_struct *plock)
622 errno = ENOSYS;
623 return false;
626 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
627 struct byte_range_lock *br_lck,
628 struct lock_struct *plock)
630 errno = ENOSYS;
631 return false;
634 static bool skel_strict_lock(struct vfs_handle_struct *handle,
635 struct files_struct *fsp,
636 struct lock_struct *plock)
638 errno = ENOSYS;
639 return false;
642 static void skel_strict_unlock(struct vfs_handle_struct *handle,
643 struct files_struct *fsp,
644 struct lock_struct *plock)
649 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
650 const char *mapped_name,
651 enum vfs_translate_direction direction,
652 TALLOC_CTX *mem_ctx, char **pmapped_name)
654 return NT_STATUS_NOT_IMPLEMENTED;
657 static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
658 struct files_struct *fsp,
659 TALLOC_CTX *ctx,
660 uint32_t function,
661 uint16_t req_flags, /* Needed for UNICODE ... */
662 const uint8_t *_in_data,
663 uint32_t in_len,
664 uint8_t **_out_data,
665 uint32_t max_out_len, uint32_t *out_len)
667 return NT_STATUS_NOT_IMPLEMENTED;
670 static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
671 const struct smb_filename *fname,
672 TALLOC_CTX *mem_ctx,
673 struct readdir_attr_data **pattr_data)
675 return NT_STATUS_NOT_IMPLEMENTED;
678 static NTSTATUS skel_get_dos_attributes(struct vfs_handle_struct *handle,
679 struct smb_filename *smb_fname,
680 uint32_t *dosmode)
682 return NT_STATUS_NOT_IMPLEMENTED;
685 static NTSTATUS skel_fget_dos_attributes(struct vfs_handle_struct *handle,
686 struct files_struct *fsp,
687 uint32_t *dosmode)
689 return NT_STATUS_NOT_IMPLEMENTED;
692 static NTSTATUS skel_set_dos_attributes(struct vfs_handle_struct *handle,
693 const struct smb_filename *smb_fname,
694 uint32_t dosmode)
696 return NT_STATUS_NOT_IMPLEMENTED;
699 static NTSTATUS skel_fset_dos_attributes(struct vfs_handle_struct *handle,
700 struct files_struct *fsp,
701 uint32_t dosmode)
703 return NT_STATUS_NOT_IMPLEMENTED;
706 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
707 uint32_t security_info,
708 TALLOC_CTX *mem_ctx,
709 struct security_descriptor **ppdesc)
711 return NT_STATUS_NOT_IMPLEMENTED;
714 static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
715 const struct smb_filename *smb_fname,
716 uint32_t security_info,
717 TALLOC_CTX *mem_ctx,
718 struct security_descriptor **ppdesc)
720 return NT_STATUS_NOT_IMPLEMENTED;
723 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
724 uint32_t security_info_sent,
725 const struct security_descriptor *psd)
727 return NT_STATUS_NOT_IMPLEMENTED;
730 static int skel_chmod_acl(vfs_handle_struct *handle,
731 const struct smb_filename *smb_fname,
732 mode_t mode)
734 errno = ENOSYS;
735 return -1;
738 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
739 mode_t mode)
741 errno = ENOSYS;
742 return -1;
745 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
746 const struct smb_filename *smb_fname,
747 SMB_ACL_TYPE_T type,
748 TALLOC_CTX *mem_ctx)
750 errno = ENOSYS;
751 return (SMB_ACL_T) NULL;
754 static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
755 files_struct *fsp, TALLOC_CTX *mem_ctx)
757 errno = ENOSYS;
758 return (SMB_ACL_T) NULL;
761 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
762 const struct smb_filename *smb_fname,
763 TALLOC_CTX *mem_ctx,
764 char **blob_description,
765 DATA_BLOB *blob)
767 errno = ENOSYS;
768 return -1;
771 static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
772 files_struct *fsp, TALLOC_CTX *mem_ctx,
773 char **blob_description, DATA_BLOB *blob)
775 errno = ENOSYS;
776 return -1;
779 static int skel_sys_acl_set_file(vfs_handle_struct *handle,
780 const struct smb_filename *smb_fname,
781 SMB_ACL_TYPE_T acltype,
782 SMB_ACL_T theacl)
784 errno = ENOSYS;
785 return -1;
788 static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
789 SMB_ACL_T theacl)
791 errno = ENOSYS;
792 return -1;
795 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,
796 const struct smb_filename *smb_fname)
798 errno = ENOSYS;
799 return -1;
802 static ssize_t skel_getxattr(vfs_handle_struct *handle,
803 const struct smb_filename *smb_fname,
804 const char *name,
805 void *value,
806 size_t size)
808 errno = ENOSYS;
809 return -1;
812 static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
813 struct files_struct *fsp, const char *name,
814 void *value, size_t size)
816 errno = ENOSYS;
817 return -1;
820 static ssize_t skel_listxattr(vfs_handle_struct *handle,
821 const struct smb_filename *smb_fname,
822 char *list,
823 size_t size)
825 errno = ENOSYS;
826 return -1;
829 static ssize_t skel_flistxattr(vfs_handle_struct *handle,
830 struct files_struct *fsp, char *list,
831 size_t size)
833 errno = ENOSYS;
834 return -1;
837 static int skel_removexattr(vfs_handle_struct *handle,
838 const struct smb_filename *smb_fname,
839 const char *name)
841 errno = ENOSYS;
842 return -1;
845 static int skel_fremovexattr(vfs_handle_struct *handle,
846 struct files_struct *fsp, const char *name)
848 errno = ENOSYS;
849 return -1;
850 return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
853 static int skel_setxattr(vfs_handle_struct *handle,
854 const struct smb_filename *smb_fname,
855 const char *name,
856 const void *value,
857 size_t size,
858 int flags)
860 errno = ENOSYS;
861 return -1;
864 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,
865 const char *name, const void *value, size_t size,
866 int flags)
868 errno = ENOSYS;
869 return -1;
872 static bool skel_aio_force(struct vfs_handle_struct *handle,
873 struct files_struct *fsp)
875 errno = ENOSYS;
876 return false;
879 /* VFS operations structure */
881 struct vfs_fn_pointers skel_opaque_fns = {
882 /* Disk operations */
884 .connect_fn = skel_connect,
885 .disconnect_fn = skel_disconnect,
886 .disk_free_fn = skel_disk_free,
887 .get_quota_fn = skel_get_quota,
888 .set_quota_fn = skel_set_quota,
889 .get_shadow_copy_data_fn = skel_get_shadow_copy_data,
890 .statvfs_fn = skel_statvfs,
891 .fs_capabilities_fn = skel_fs_capabilities,
892 .get_dfs_referrals_fn = skel_get_dfs_referrals,
893 .snap_check_path_fn = skel_snap_check_path,
894 .snap_create_fn = skel_snap_create,
895 .snap_delete_fn = skel_snap_delete,
897 /* Directory operations */
899 .opendir_fn = skel_opendir,
900 .fdopendir_fn = skel_fdopendir,
901 .readdir_fn = skel_readdir,
902 .seekdir_fn = skel_seekdir,
903 .telldir_fn = skel_telldir,
904 .rewind_dir_fn = skel_rewind_dir,
905 .mkdir_fn = skel_mkdir,
906 .rmdir_fn = skel_rmdir,
907 .closedir_fn = skel_closedir,
908 .init_search_op_fn = skel_init_search_op,
910 /* File operations */
912 .open_fn = skel_open,
913 .create_file_fn = skel_create_file,
914 .close_fn = skel_close_fn,
915 .read_fn = skel_vfs_read,
916 .pread_fn = skel_pread,
917 .pread_send_fn = skel_pread_send,
918 .pread_recv_fn = skel_pread_recv,
919 .write_fn = skel_write,
920 .pwrite_fn = skel_pwrite,
921 .pwrite_send_fn = skel_pwrite_send,
922 .pwrite_recv_fn = skel_pwrite_recv,
923 .lseek_fn = skel_lseek,
924 .sendfile_fn = skel_sendfile,
925 .recvfile_fn = skel_recvfile,
926 .rename_fn = skel_rename,
927 .fsync_fn = skel_fsync,
928 .fsync_send_fn = skel_fsync_send,
929 .fsync_recv_fn = skel_fsync_recv,
930 .stat_fn = skel_stat,
931 .fstat_fn = skel_fstat,
932 .lstat_fn = skel_lstat,
933 .get_alloc_size_fn = skel_get_alloc_size,
934 .unlink_fn = skel_unlink,
935 .chmod_fn = skel_chmod,
936 .fchmod_fn = skel_fchmod,
937 .chown_fn = skel_chown,
938 .fchown_fn = skel_fchown,
939 .lchown_fn = skel_lchown,
940 .chdir_fn = skel_chdir,
941 .getwd_fn = skel_getwd,
942 .ntimes_fn = skel_ntimes,
943 .ftruncate_fn = skel_ftruncate,
944 .fallocate_fn = skel_fallocate,
945 .lock_fn = skel_lock,
946 .kernel_flock_fn = skel_kernel_flock,
947 .linux_setlease_fn = skel_linux_setlease,
948 .getlock_fn = skel_getlock,
949 .symlink_fn = skel_symlink,
950 .readlink_fn = skel_vfs_readlink,
951 .link_fn = skel_link,
952 .mknod_fn = skel_mknod,
953 .realpath_fn = skel_realpath,
954 .chflags_fn = skel_chflags,
955 .file_id_create_fn = skel_file_id_create,
956 .copy_chunk_send_fn = skel_copy_chunk_send,
957 .copy_chunk_recv_fn = skel_copy_chunk_recv,
958 .get_compression_fn = skel_get_compression,
959 .set_compression_fn = skel_set_compression,
961 .streaminfo_fn = skel_streaminfo,
962 .get_real_filename_fn = skel_get_real_filename,
963 .connectpath_fn = skel_connectpath,
964 .brl_lock_windows_fn = skel_brl_lock_windows,
965 .brl_unlock_windows_fn = skel_brl_unlock_windows,
966 .brl_cancel_windows_fn = skel_brl_cancel_windows,
967 .strict_lock_fn = skel_strict_lock,
968 .strict_unlock_fn = skel_strict_unlock,
969 .translate_name_fn = skel_translate_name,
970 .fsctl_fn = skel_fsctl,
971 .readdir_attr_fn = skel_readdir_attr,
973 /* DOS attributes. */
974 .get_dos_attributes_fn = skel_get_dos_attributes,
975 .fget_dos_attributes_fn = skel_fget_dos_attributes,
976 .set_dos_attributes_fn = skel_set_dos_attributes,
977 .fset_dos_attributes_fn = skel_fset_dos_attributes,
979 /* NT ACL operations. */
981 .fget_nt_acl_fn = skel_fget_nt_acl,
982 .get_nt_acl_fn = skel_get_nt_acl,
983 .fset_nt_acl_fn = skel_fset_nt_acl,
985 /* POSIX ACL operations. */
987 .chmod_acl_fn = skel_chmod_acl,
988 .fchmod_acl_fn = skel_fchmod_acl,
990 .sys_acl_get_file_fn = skel_sys_acl_get_file,
991 .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
992 .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
993 .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
994 .sys_acl_set_file_fn = skel_sys_acl_set_file,
995 .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
996 .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
998 /* EA operations. */
999 .getxattr_fn = skel_getxattr,
1000 .fgetxattr_fn = skel_fgetxattr,
1001 .listxattr_fn = skel_listxattr,
1002 .flistxattr_fn = skel_flistxattr,
1003 .removexattr_fn = skel_removexattr,
1004 .fremovexattr_fn = skel_fremovexattr,
1005 .setxattr_fn = skel_setxattr,
1006 .fsetxattr_fn = skel_fsetxattr,
1008 /* aio operations */
1009 .aio_force_fn = skel_aio_force,
1012 static_decl_vfs;
1013 NTSTATUS vfs_skel_opaque_init(TALLOC_CTX *ctx)
1015 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
1016 &skel_opaque_fns);