s3-vfs: Add pread_send/recv to vfs modules
[Samba.git] / examples / VFS / skel_opaque.c
blob56f3b977acfa72dfd5122579a5f626be27d8c8b2
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/>.
25 #include "../source3/include/includes.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, const char *user)
37 errno = ENOSYS;
38 return -1;
41 static void skel_disconnect(vfs_handle_struct *handle)
46 static uint64_t skel_disk_free(vfs_handle_struct *handle, const char *path,
47 bool small_query, uint64_t *bsize,
48 uint64_t *dfree, uint64_t *dsize)
50 *bsize = 0;
51 *dfree = 0;
52 *dsize = 0;
53 return 0;
56 static int skel_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq)
58 errno = ENOSYS;
59 return -1;
62 static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq)
64 errno = ENOSYS;
65 return -1;
68 static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, struct shadow_copy_data *shadow_copy_data, bool labels)
70 errno = ENOSYS;
71 return -1;
74 static int skel_statvfs(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf)
76 errno = ENOSYS;
77 return -1;
80 static uint32_t skel_fs_capabilities(struct vfs_handle_struct *handle, enum timestamp_set_resolution *p_ts_res)
82 return 0;
85 static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
86 struct dfs_GetDFSReferral *r)
88 return NT_STATUS_NOT_IMPLEMENTED;
91 static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
93 return NULL;
96 static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
98 return NULL;
101 static struct dirent *skel_readdir(vfs_handle_struct *handle,
102 DIR *dirp,
103 SMB_STRUCT_STAT *sbuf)
105 return NULL;
108 static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
113 static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
115 return (long)-1;
118 static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
123 static int skel_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode)
125 errno = ENOSYS;
126 return -1;
129 static int skel_rmdir(vfs_handle_struct *handle, const char *path)
131 errno = ENOSYS;
132 return -1;
135 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
137 errno = ENOSYS;
138 return -1;
141 static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
146 static int skel_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
147 files_struct *fsp, int flags, mode_t mode)
149 errno = ENOSYS;
150 return -1;
153 static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
154 struct smb_request *req,
155 uint16_t root_dir_fid,
156 struct smb_filename *smb_fname,
157 uint32_t access_mask,
158 uint32_t share_access,
159 uint32_t create_disposition,
160 uint32_t create_options,
161 uint32_t file_attributes,
162 uint32_t oplock_request,
163 uint64_t allocation_size,
164 uint32_t private_flags,
165 struct security_descriptor *sd,
166 struct ea_list *ea_list,
167 files_struct **result,
168 int *pinfo)
170 return NT_STATUS_NOT_IMPLEMENTED;
173 static int skel_close_fn(vfs_handle_struct *handle, files_struct *fsp)
175 errno = ENOSYS;
176 return -1;
179 static ssize_t skel_vfs_read(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n)
181 errno = ENOSYS;
182 return -1;
185 static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n, off_t offset)
187 errno = ENOSYS;
188 return -1;
191 static struct tevent_req *skel_pread_send(struct vfs_handle_struct *handle,
192 TALLOC_CTX *mem_ctx,
193 struct tevent_context *ev,
194 struct files_struct *fsp,
195 void *data, size_t n, off_t offset)
197 return NULL;
200 static ssize_t skel_pread_recv(struct tevent_req *req, int *err)
202 *err = ENOSYS;
203 return -1;
206 static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n)
208 errno = ENOSYS;
209 return -1;
212 static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n, off_t offset)
214 errno = ENOSYS;
215 return -1;
218 static off_t skel_lseek(vfs_handle_struct *handle, files_struct *fsp, off_t offset, int whence)
220 errno = ENOSYS;
221 return (off_t)-1;
224 static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *hdr, off_t offset, size_t n)
226 errno = ENOSYS;
227 return -1;
230 static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct *tofsp, off_t offset, size_t n)
232 errno = ENOSYS;
233 return -1;
236 static int skel_rename(vfs_handle_struct *handle,
237 const struct smb_filename *smb_fname_src,
238 const struct smb_filename *smb_fname_dst)
240 errno = ENOSYS;
241 return -1;
244 static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
246 errno = ENOSYS;
247 return -1;
250 static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
252 errno = ENOSYS;
253 return -1;
256 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf)
258 errno = ENOSYS;
259 return -1;
262 static int skel_lstat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
264 errno = ENOSYS;
265 return -1;
268 static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_STAT *sbuf)
270 errno = ENOSYS;
271 return -1;
274 static int skel_unlink(vfs_handle_struct *handle,
275 const struct smb_filename *smb_fname)
277 errno = ENOSYS;
278 return -1;
281 static int skel_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
283 errno = ENOSYS;
284 return -1;
287 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
289 errno = ENOSYS;
290 return -1;
293 static int skel_chown(vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid)
295 errno = ENOSYS;
296 return -1;
299 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp, uid_t uid, gid_t gid)
301 errno = ENOSYS;
302 return -1;
305 static int skel_lchown(vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid)
307 errno = ENOSYS;
308 return -1;
311 static int skel_chdir(vfs_handle_struct *handle, const char *path)
313 errno = ENOSYS;
314 return -1;
317 static char *skel_getwd(vfs_handle_struct *handle)
319 errno = ENOSYS;
320 return NULL;
323 static int skel_ntimes(vfs_handle_struct *handle,
324 const struct smb_filename *smb_fname,
325 struct smb_file_time *ft)
327 errno = ENOSYS;
328 return -1;
331 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, off_t offset)
333 errno = ENOSYS;
334 return -1;
337 static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
338 enum vfs_fallocate_mode mode,
339 off_t offset, off_t len)
341 errno = ENOSYS;
342 return -1;
345 static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, off_t offset, off_t count, int type)
347 errno = ENOSYS;
348 return false;
351 static int skel_kernel_flock(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32 share_mode, uint32 access_mask)
353 errno = ENOSYS;
354 return -1;
357 static int skel_linux_setlease(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype)
359 errno = ENOSYS;
360 return -1;
363 static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp, off_t *poffset, off_t *pcount, int *ptype, pid_t *ppid)
365 errno = ENOSYS;
366 return false;
369 static int skel_symlink(vfs_handle_struct *handle, const char *oldpath, const char *newpath)
371 errno = ENOSYS;
372 return -1;
375 static int skel_vfs_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz)
377 errno = ENOSYS;
378 return -1;
381 static int skel_link(vfs_handle_struct *handle, const char *oldpath, const char *newpath)
383 errno = ENOSYS;
384 return -1;
387 static int skel_mknod(vfs_handle_struct *handle, const char *path, mode_t mode, SMB_DEV_T dev)
389 errno = ENOSYS;
390 return -1;
393 static char *skel_realpath(vfs_handle_struct *handle, const char *path)
395 errno = ENOSYS;
396 return NULL;
399 static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle,
400 struct sys_notify_context *ctx,
401 const char *path,
402 uint32_t *filter,
403 uint32_t *subdir_filter,
404 void (*callback)(struct sys_notify_context *ctx, void *private_data, struct notify_event *ev),
405 void *private_data, void *handle_p)
407 return NT_STATUS_NOT_IMPLEMENTED;
410 static int skel_chflags(vfs_handle_struct *handle, const char *path, uint flags)
412 errno = ENOSYS;
413 return -1;
416 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
417 const SMB_STRUCT_STAT *sbuf)
419 struct file_id id;
420 ZERO_STRUCT(id);
421 errno = ENOSYS;
422 return id;
425 static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
426 struct files_struct *fsp,
427 const char *fname,
428 TALLOC_CTX *mem_ctx,
429 unsigned int *num_streams,
430 struct stream_struct **streams)
432 return NT_STATUS_NOT_IMPLEMENTED;
435 static int skel_get_real_filename(struct vfs_handle_struct *handle,
436 const char *path,
437 const char *name,
438 TALLOC_CTX *mem_ctx,
439 char **found_name)
441 errno = ENOSYS;
442 return -1;
445 static const char *skel_connectpath(struct vfs_handle_struct *handle,
446 const char *filename)
448 errno = ENOSYS;
449 return NULL;
452 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
453 struct byte_range_lock *br_lck,
454 struct lock_struct *plock,
455 bool blocking_lock,
456 struct blocking_lock_record *blr)
458 return NT_STATUS_NOT_IMPLEMENTED;
461 static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
462 struct messaging_context *msg_ctx,
463 struct byte_range_lock *br_lck,
464 const struct lock_struct *plock)
466 errno = ENOSYS;
467 return false;
470 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
471 struct byte_range_lock *br_lck,
472 struct lock_struct *plock,
473 struct blocking_lock_record *blr)
475 errno = ENOSYS;
476 return false;
479 static bool skel_strict_lock(struct vfs_handle_struct *handle,
480 struct files_struct *fsp,
481 struct lock_struct *plock)
483 errno = ENOSYS;
484 return false;
487 static void skel_strict_unlock(struct vfs_handle_struct *handle,
488 struct files_struct *fsp,
489 struct lock_struct *plock)
494 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
495 const char *mapped_name,
496 enum vfs_translate_direction direction,
497 TALLOC_CTX *mem_ctx,
498 char **pmapped_name)
500 return NT_STATUS_NOT_IMPLEMENTED;
503 static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
504 struct files_struct *fsp,
505 TALLOC_CTX *ctx,
506 uint32_t function,
507 uint16_t req_flags, /* Needed for UNICODE ... */
508 const uint8_t *_in_data,
509 uint32_t in_len,
510 uint8_t **_out_data,
511 uint32_t max_out_len,
512 uint32_t *out_len)
514 return NT_STATUS_NOT_IMPLEMENTED;
517 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
518 uint32 security_info, struct security_descriptor **ppdesc)
520 return NT_STATUS_NOT_IMPLEMENTED;
523 static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
524 const char *name, uint32 security_info, struct security_descriptor **ppdesc)
526 return NT_STATUS_NOT_IMPLEMENTED;
529 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
530 uint32 security_info_sent, const struct security_descriptor *psd)
532 return NT_STATUS_NOT_IMPLEMENTED;
535 static int skel_chmod_acl(vfs_handle_struct *handle, const char *name, mode_t mode)
537 errno = ENOSYS;
538 return -1;
541 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
543 errno = ENOSYS;
544 return -1;
547 static int skel_sys_acl_get_entry(vfs_handle_struct *handle, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
549 errno = ENOSYS;
550 return -1;
553 static int skel_sys_acl_get_tag_type(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p)
555 errno = ENOSYS;
556 return -1;
559 static int skel_sys_acl_get_permset(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p)
561 errno = ENOSYS;
562 return -1;
565 static void *skel_sys_acl_get_qualifier(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry_d)
567 errno = ENOSYS;
568 return NULL;
571 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type)
573 errno = ENOSYS;
574 return (SMB_ACL_T)NULL;
577 static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
579 errno = ENOSYS;
580 return (SMB_ACL_T)NULL;
583 static int skel_sys_acl_clear_perms(vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset)
585 errno = ENOSYS;
586 return -1;
589 static int skel_sys_acl_add_perm(vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
591 errno = ENOSYS;
592 return -1;
595 static char *skel_sys_acl_to_text(vfs_handle_struct *handle, SMB_ACL_T theacl, ssize_t *plen)
597 errno = ENOSYS;
598 return NULL;
601 static SMB_ACL_T skel_sys_acl_init(vfs_handle_struct *handle, int count)
603 errno = ENOSYS;
604 return (SMB_ACL_T)NULL;
607 static int skel_sys_acl_create_entry(vfs_handle_struct *handle, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry)
609 errno = ENOSYS;
610 return -1;
613 static int skel_sys_acl_set_tag_type(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype)
615 errno = ENOSYS;
616 return -1;
619 static int skel_sys_acl_set_qualifier(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, void *qual)
621 errno = ENOSYS;
622 return -1;
625 static int skel_sys_acl_set_permset(vfs_handle_struct *handle, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset)
627 errno = ENOSYS;
628 return -1;
631 static int skel_sys_acl_valid(vfs_handle_struct *handle, SMB_ACL_T theacl )
633 errno = ENOSYS;
634 return -1;
637 static int skel_sys_acl_set_file(vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
639 errno = ENOSYS;
640 return -1;
643 static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
645 errno = ENOSYS;
646 return -1;
649 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path)
651 errno = ENOSYS;
652 return -1;
655 static int skel_sys_acl_get_perm(vfs_handle_struct *handle, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
657 errno = ENOSYS;
658 return -1;
661 static int skel_sys_acl_free_text(vfs_handle_struct *handle, char *text)
663 errno = ENOSYS;
664 return -1;
667 static int skel_sys_acl_free_acl(vfs_handle_struct *handle, SMB_ACL_T posix_acl)
669 errno = ENOSYS;
670 return -1;
673 static int skel_sys_acl_free_qualifier(vfs_handle_struct *handle, void *qualifier, SMB_ACL_TAG_T tagtype)
675 errno = ENOSYS;
676 return -1;
679 static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t size)
681 errno = ENOSYS;
682 return -1;
685 static ssize_t skel_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size)
687 errno = ENOSYS;
688 return -1;
691 static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
693 errno = ENOSYS;
694 return -1;
697 static ssize_t skel_flistxattr(vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
699 errno = ENOSYS;
700 return -1;
703 static int skel_removexattr(vfs_handle_struct *handle, const char *path, const char *name)
705 errno = ENOSYS;
706 return -1;
709 static int skel_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
711 errno = ENOSYS;
712 return -1;
713 return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
716 static int skel_setxattr(vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
718 errno = ENOSYS;
719 return -1;
722 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags)
724 errno = ENOSYS;
725 return -1;
728 static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
730 errno = ENOSYS;
731 return -1;
734 static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
736 errno = ENOSYS;
737 return -1;
740 static ssize_t skel_aio_return_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
742 errno = ENOSYS;
743 return -1;
746 static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
748 errno = ENOSYS;
749 return -1;
752 static int skel_aio_error_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
754 errno = ENOSYS;
755 return -1;
758 static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
760 errno = ENOSYS;
761 return -1;
764 static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
766 errno = ENOSYS;
767 return -1;
770 static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
772 errno = ENOSYS;
773 return false;
776 static bool skel_is_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname, SMB_STRUCT_STAT *sbuf)
778 errno = ENOSYS;
779 return false;
782 static int skel_set_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname)
784 errno = ENOSYS;
785 return -1;
788 /* VFS operations structure */
790 struct vfs_fn_pointers skel_opaque_fns = {
791 /* Disk operations */
793 .connect_fn = skel_connect,
794 .disconnect_fn = skel_disconnect,
795 .disk_free_fn = skel_disk_free,
796 .get_quota_fn = skel_get_quota,
797 .set_quota_fn = skel_set_quota,
798 .get_shadow_copy_data_fn = skel_get_shadow_copy_data,
799 .statvfs_fn = skel_statvfs,
800 .fs_capabilities_fn = skel_fs_capabilities,
801 .get_dfs_referrals_fn = skel_get_dfs_referrals,
803 /* Directory operations */
805 .opendir_fn = skel_opendir,
806 .fdopendir_fn = skel_fdopendir,
807 .readdir_fn = skel_readdir,
808 .seekdir_fn = skel_seekdir,
809 .telldir_fn = skel_telldir,
810 .rewind_dir_fn = skel_rewind_dir,
811 .mkdir_fn = skel_mkdir,
812 .rmdir_fn = skel_rmdir,
813 .closedir_fn = skel_closedir,
814 .init_search_op_fn = skel_init_search_op,
816 /* File operations */
818 .open_fn = skel_open,
819 .create_file_fn = skel_create_file,
820 .close_fn = skel_close_fn,
821 .read_fn = skel_vfs_read,
822 .pread_fn = skel_pread,
823 .pread_send_fn = skel_pread_send,
824 .pread_recv_fn = skel_pread_recv,
825 .write_fn = skel_write,
826 .pwrite_fn = skel_pwrite,
827 .lseek_fn = skel_lseek,
828 .sendfile_fn = skel_sendfile,
829 .recvfile_fn = skel_recvfile,
830 .rename_fn = skel_rename,
831 .fsync_fn = skel_fsync,
832 .stat_fn = skel_stat,
833 .fstat_fn = skel_fstat,
834 .lstat_fn = skel_lstat,
835 .get_alloc_size_fn = skel_get_alloc_size,
836 .unlink_fn = skel_unlink,
837 .chmod_fn = skel_chmod,
838 .fchmod_fn = skel_fchmod,
839 .chown_fn = skel_chown,
840 .fchown_fn = skel_fchown,
841 .lchown_fn = skel_lchown,
842 .chdir_fn = skel_chdir,
843 .getwd_fn = skel_getwd,
844 .ntimes_fn = skel_ntimes,
845 .ftruncate_fn = skel_ftruncate,
846 .fallocate_fn = skel_fallocate,
847 .lock_fn = skel_lock,
848 .kernel_flock_fn = skel_kernel_flock,
849 .linux_setlease_fn = skel_linux_setlease,
850 .getlock_fn = skel_getlock,
851 .symlink_fn = skel_symlink,
852 .readlink_fn = skel_vfs_readlink,
853 .link_fn = skel_link,
854 .mknod_fn = skel_mknod,
855 .realpath_fn = skel_realpath,
856 .notify_watch_fn = skel_notify_watch,
857 .chflags_fn = skel_chflags,
858 .file_id_create_fn = skel_file_id_create,
860 .streaminfo_fn = skel_streaminfo,
861 .get_real_filename_fn = skel_get_real_filename,
862 .connectpath_fn = skel_connectpath,
863 .brl_lock_windows_fn = skel_brl_lock_windows,
864 .brl_unlock_windows_fn = skel_brl_unlock_windows,
865 .brl_cancel_windows_fn = skel_brl_cancel_windows,
866 .strict_lock_fn = skel_strict_lock,
867 .strict_unlock_fn = skel_strict_unlock,
868 .translate_name_fn = skel_translate_name,
869 .fsctl_fn = skel_fsctl,
871 /* NT ACL operations. */
873 .fget_nt_acl_fn = skel_fget_nt_acl,
874 .get_nt_acl_fn = skel_get_nt_acl,
875 .fset_nt_acl_fn = skel_fset_nt_acl,
877 /* POSIX ACL operations. */
879 .chmod_acl_fn = skel_chmod_acl,
880 .fchmod_acl_fn = skel_fchmod_acl,
882 .sys_acl_get_entry_fn = skel_sys_acl_get_entry,
883 .sys_acl_get_tag_type_fn = skel_sys_acl_get_tag_type,
884 .sys_acl_get_permset_fn = skel_sys_acl_get_permset,
885 .sys_acl_get_qualifier_fn = skel_sys_acl_get_qualifier,
886 .sys_acl_get_file_fn = skel_sys_acl_get_file,
887 .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
888 .sys_acl_clear_perms_fn = skel_sys_acl_clear_perms,
889 .sys_acl_add_perm_fn = skel_sys_acl_add_perm,
890 .sys_acl_to_text_fn = skel_sys_acl_to_text,
891 .sys_acl_init_fn = skel_sys_acl_init,
892 .sys_acl_create_entry_fn = skel_sys_acl_create_entry,
893 .sys_acl_set_tag_type_fn = skel_sys_acl_set_tag_type,
894 .sys_acl_set_qualifier_fn = skel_sys_acl_set_qualifier,
895 .sys_acl_set_permset_fn = skel_sys_acl_set_permset,
896 .sys_acl_valid_fn = skel_sys_acl_valid,
897 .sys_acl_set_file_fn = skel_sys_acl_set_file,
898 .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
899 .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
900 .sys_acl_get_perm_fn = skel_sys_acl_get_perm,
901 .sys_acl_free_text_fn = skel_sys_acl_free_text,
902 .sys_acl_free_acl_fn = skel_sys_acl_free_acl,
903 .sys_acl_free_qualifier_fn = skel_sys_acl_free_qualifier,
905 /* EA operations. */
906 .getxattr_fn = skel_getxattr,
907 .fgetxattr_fn = skel_fgetxattr,
908 .listxattr_fn = skel_listxattr,
909 .flistxattr_fn = skel_flistxattr,
910 .removexattr_fn = skel_removexattr,
911 .fremovexattr_fn = skel_fremovexattr,
912 .setxattr_fn = skel_setxattr,
913 .fsetxattr_fn = skel_fsetxattr,
915 /* aio operations */
916 .aio_read_fn = skel_aio_read,
917 .aio_write_fn = skel_aio_write,
918 .aio_return_fn = skel_aio_return_fn,
919 .aio_cancel_fn = skel_aio_cancel,
920 .aio_error_fn = skel_aio_error_fn,
921 .aio_fsync_fn = skel_aio_fsync,
922 .aio_suspend_fn = skel_aio_suspend,
923 .aio_force_fn = skel_aio_force,
925 /* offline operations */
926 .is_offline_fn = skel_is_offline,
927 .set_offline_fn = skel_set_offline
930 NTSTATUS vfs_skel_opaque_init(void)
932 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque", &skel_opaque_fns);