s3-pam_smbpass: Fix set_ctrl() return value.
[Samba.git] / examples / VFS / skel_opaque.c
blobb52c381572eb1b9ec97a87c65d50c508a0cfb4a8
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 bool small_query, 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, enum SMB_QUOTA_TYPE qtype,
58 unid_t id, SMB_DISK_QUOTA *dq)
60 errno = ENOSYS;
61 return -1;
64 static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
65 unid_t id, SMB_DISK_QUOTA *dq)
67 errno = ENOSYS;
68 return -1;
71 static int skel_get_shadow_copy_data(vfs_handle_struct *handle,
72 files_struct *fsp,
73 struct shadow_copy_data *shadow_copy_data,
74 bool labels)
76 errno = ENOSYS;
77 return -1;
80 static int skel_statvfs(struct vfs_handle_struct *handle,
81 const char *path, struct vfs_statvfs_struct *statbuf)
83 errno = ENOSYS;
84 return -1;
87 static uint32_t skel_fs_capabilities(struct vfs_handle_struct *handle,
88 enum timestamp_set_resolution *p_ts_res)
90 return 0;
93 static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
94 struct dfs_GetDFSReferral *r)
96 return NT_STATUS_NOT_IMPLEMENTED;
99 static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname,
100 const char *mask, uint32 attr)
102 return NULL;
105 static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
106 const char *mask, uint32 attr)
108 return NULL;
111 static struct dirent *skel_readdir(vfs_handle_struct *handle,
112 DIR *dirp, SMB_STRUCT_STAT *sbuf)
114 return NULL;
117 static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
122 static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
124 return (long)-1;
127 static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
132 static int skel_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode)
134 errno = ENOSYS;
135 return -1;
138 static int skel_rmdir(vfs_handle_struct *handle, const char *path)
140 errno = ENOSYS;
141 return -1;
144 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
146 errno = ENOSYS;
147 return -1;
150 static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
155 static int skel_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
156 files_struct *fsp, int flags, mode_t mode)
158 errno = ENOSYS;
159 return -1;
162 static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
163 struct smb_request *req,
164 uint16_t root_dir_fid,
165 struct smb_filename *smb_fname,
166 uint32_t access_mask,
167 uint32_t share_access,
168 uint32_t create_disposition,
169 uint32_t create_options,
170 uint32_t file_attributes,
171 uint32_t oplock_request,
172 struct smb2_lease *lease,
173 uint64_t allocation_size,
174 uint32_t private_flags,
175 struct security_descriptor *sd,
176 struct ea_list *ea_list,
177 files_struct **result, int *pinfo,
178 const struct smb2_create_blobs *in_context_blobs,
179 struct smb2_create_blobs *out_context_blobs)
181 return NT_STATUS_NOT_IMPLEMENTED;
184 static int skel_close_fn(vfs_handle_struct *handle, files_struct *fsp)
186 errno = ENOSYS;
187 return -1;
190 static ssize_t skel_vfs_read(vfs_handle_struct *handle, files_struct *fsp,
191 void *data, size_t n)
193 errno = ENOSYS;
194 return -1;
197 static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp,
198 void *data, size_t n, off_t offset)
200 errno = ENOSYS;
201 return -1;
204 static struct tevent_req *skel_pread_send(struct vfs_handle_struct *handle,
205 TALLOC_CTX *mem_ctx,
206 struct tevent_context *ev,
207 struct files_struct *fsp,
208 void *data, size_t n, off_t offset)
210 return NULL;
213 static ssize_t skel_pread_recv(struct tevent_req *req, int *err)
215 *err = ENOSYS;
216 return -1;
219 static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp,
220 const void *data, size_t n)
222 errno = ENOSYS;
223 return -1;
226 static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp,
227 const void *data, size_t n, off_t offset)
229 errno = ENOSYS;
230 return -1;
233 static struct tevent_req *skel_pwrite_send(struct vfs_handle_struct *handle,
234 TALLOC_CTX *mem_ctx,
235 struct tevent_context *ev,
236 struct files_struct *fsp,
237 const void *data,
238 size_t n, off_t offset)
240 return NULL;
243 static ssize_t skel_pwrite_recv(struct tevent_req *req, int *err)
245 *err = ENOSYS;
246 return -1;
249 static off_t skel_lseek(vfs_handle_struct *handle, files_struct *fsp,
250 off_t offset, int whence)
252 errno = ENOSYS;
253 return (off_t) - 1;
256 static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd,
257 files_struct *fromfsp, const DATA_BLOB *hdr,
258 off_t offset, size_t n)
260 errno = ENOSYS;
261 return -1;
264 static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd,
265 files_struct *tofsp, off_t offset, size_t n)
267 errno = ENOSYS;
268 return -1;
271 static int skel_rename(vfs_handle_struct *handle,
272 const struct smb_filename *smb_fname_src,
273 const struct smb_filename *smb_fname_dst)
275 errno = ENOSYS;
276 return -1;
279 static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
281 errno = ENOSYS;
282 return -1;
285 static struct tevent_req *skel_fsync_send(struct vfs_handle_struct *handle,
286 TALLOC_CTX *mem_ctx,
287 struct tevent_context *ev,
288 struct files_struct *fsp)
290 return NULL;
293 static int skel_fsync_recv(struct tevent_req *req, int *err)
295 *err = ENOSYS;
296 return -1;
299 static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
301 errno = ENOSYS;
302 return -1;
305 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp,
306 SMB_STRUCT_STAT *sbuf)
308 errno = ENOSYS;
309 return -1;
312 static int skel_lstat(vfs_handle_struct *handle,
313 struct smb_filename *smb_fname)
315 errno = ENOSYS;
316 return -1;
319 static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle,
320 struct files_struct *fsp,
321 const SMB_STRUCT_STAT *sbuf)
323 errno = ENOSYS;
324 return -1;
327 static int skel_unlink(vfs_handle_struct *handle,
328 const struct smb_filename *smb_fname)
330 errno = ENOSYS;
331 return -1;
334 static int skel_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
336 errno = ENOSYS;
337 return -1;
340 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
341 mode_t mode)
343 errno = ENOSYS;
344 return -1;
347 static int skel_chown(vfs_handle_struct *handle, const char *path,
348 uid_t uid, gid_t gid)
350 errno = ENOSYS;
351 return -1;
354 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp,
355 uid_t uid, gid_t gid)
357 errno = ENOSYS;
358 return -1;
361 static int skel_lchown(vfs_handle_struct *handle, const char *path,
362 uid_t uid, gid_t gid)
364 errno = ENOSYS;
365 return -1;
368 static int skel_chdir(vfs_handle_struct *handle, const char *path)
370 errno = ENOSYS;
371 return -1;
374 static char *skel_getwd(vfs_handle_struct *handle)
376 errno = ENOSYS;
377 return NULL;
380 static int skel_ntimes(vfs_handle_struct *handle,
381 const struct smb_filename *smb_fname,
382 struct smb_file_time *ft)
384 errno = ENOSYS;
385 return -1;
388 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
389 off_t offset)
391 errno = ENOSYS;
392 return -1;
395 static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
396 enum vfs_fallocate_mode mode, off_t offset, off_t len)
398 errno = ENOSYS;
399 return -1;
402 static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op,
403 off_t offset, off_t count, int type)
405 errno = ENOSYS;
406 return false;
409 static int skel_kernel_flock(struct vfs_handle_struct *handle,
410 struct files_struct *fsp,
411 uint32 share_mode, uint32 access_mask)
413 errno = ENOSYS;
414 return -1;
417 static int skel_linux_setlease(struct vfs_handle_struct *handle,
418 struct files_struct *fsp, int leasetype)
420 errno = ENOSYS;
421 return -1;
424 static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp,
425 off_t *poffset, off_t *pcount, int *ptype,
426 pid_t *ppid)
428 errno = ENOSYS;
429 return false;
432 static int skel_symlink(vfs_handle_struct *handle, const char *oldpath,
433 const char *newpath)
435 errno = ENOSYS;
436 return -1;
439 static int skel_vfs_readlink(vfs_handle_struct *handle, const char *path,
440 char *buf, size_t bufsiz)
442 errno = ENOSYS;
443 return -1;
446 static int skel_link(vfs_handle_struct *handle, const char *oldpath,
447 const char *newpath)
449 errno = ENOSYS;
450 return -1;
453 static int skel_mknod(vfs_handle_struct *handle, const char *path, mode_t mode,
454 SMB_DEV_T dev)
456 errno = ENOSYS;
457 return -1;
460 static char *skel_realpath(vfs_handle_struct *handle, const char *path)
462 errno = ENOSYS;
463 return NULL;
466 static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle,
467 struct sys_notify_context *ctx,
468 const char *path,
469 uint32_t *filter,
470 uint32_t *subdir_filter,
471 void (*callback) (struct sys_notify_context *
472 ctx, void *private_data,
473 struct notify_event *ev),
474 void *private_data, void *handle_p)
476 return NT_STATUS_NOT_IMPLEMENTED;
479 static int skel_chflags(vfs_handle_struct *handle, const char *path,
480 uint flags)
482 errno = ENOSYS;
483 return -1;
486 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
487 const SMB_STRUCT_STAT *sbuf)
489 struct file_id id;
490 ZERO_STRUCT(id);
491 errno = ENOSYS;
492 return id;
495 struct skel_cc_state {
496 uint64_t unused;
498 static struct tevent_req *skel_copy_chunk_send(struct vfs_handle_struct *handle,
499 TALLOC_CTX *mem_ctx,
500 struct tevent_context *ev,
501 struct files_struct *src_fsp,
502 off_t src_off,
503 struct files_struct *dest_fsp,
504 off_t dest_off,
505 off_t num)
507 struct tevent_req *req;
508 struct skel_cc_state *cc_state;
510 req = tevent_req_create(mem_ctx, &cc_state, struct skel_cc_state);
511 if (req == NULL) {
512 return NULL;
515 tevent_req_nterror(req, NT_STATUS_NOT_IMPLEMENTED);
516 return tevent_req_post(req, ev);
519 static NTSTATUS skel_copy_chunk_recv(struct vfs_handle_struct *handle,
520 struct tevent_req *req,
521 off_t *copied)
523 NTSTATUS status;
525 if (tevent_req_is_nterror(req, &status)) {
526 tevent_req_received(req);
527 return status;
529 tevent_req_received(req);
531 return NT_STATUS_OK;
534 static NTSTATUS skel_get_compression(struct vfs_handle_struct *handle,
535 TALLOC_CTX *mem_ctx,
536 struct files_struct *fsp,
537 struct smb_filename *smb_fname,
538 uint16_t *_compression_fmt)
540 return NT_STATUS_INVALID_DEVICE_REQUEST;
543 static NTSTATUS skel_set_compression(struct vfs_handle_struct *handle,
544 TALLOC_CTX *mem_ctx,
545 struct files_struct *fsp,
546 uint16_t compression_fmt)
548 return NT_STATUS_INVALID_DEVICE_REQUEST;
551 static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
552 struct files_struct *fsp,
553 const char *fname,
554 TALLOC_CTX *mem_ctx,
555 unsigned int *num_streams,
556 struct stream_struct **streams)
558 return NT_STATUS_NOT_IMPLEMENTED;
561 static int skel_get_real_filename(struct vfs_handle_struct *handle,
562 const char *path,
563 const char *name,
564 TALLOC_CTX *mem_ctx, char **found_name)
566 errno = ENOSYS;
567 return -1;
570 static const char *skel_connectpath(struct vfs_handle_struct *handle,
571 const char *filename)
573 errno = ENOSYS;
574 return NULL;
577 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
578 struct byte_range_lock *br_lck,
579 struct lock_struct *plock,
580 bool blocking_lock)
582 return NT_STATUS_NOT_IMPLEMENTED;
585 static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
586 struct messaging_context *msg_ctx,
587 struct byte_range_lock *br_lck,
588 const struct lock_struct *plock)
590 errno = ENOSYS;
591 return false;
594 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
595 struct byte_range_lock *br_lck,
596 struct lock_struct *plock)
598 errno = ENOSYS;
599 return false;
602 static bool skel_strict_lock(struct vfs_handle_struct *handle,
603 struct files_struct *fsp,
604 struct lock_struct *plock)
606 errno = ENOSYS;
607 return false;
610 static void skel_strict_unlock(struct vfs_handle_struct *handle,
611 struct files_struct *fsp,
612 struct lock_struct *plock)
617 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
618 const char *mapped_name,
619 enum vfs_translate_direction direction,
620 TALLOC_CTX *mem_ctx, char **pmapped_name)
622 return NT_STATUS_NOT_IMPLEMENTED;
625 static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
626 struct files_struct *fsp,
627 TALLOC_CTX *ctx,
628 uint32_t function,
629 uint16_t req_flags, /* Needed for UNICODE ... */
630 const uint8_t *_in_data,
631 uint32_t in_len,
632 uint8_t **_out_data,
633 uint32_t max_out_len, uint32_t *out_len)
635 return NT_STATUS_NOT_IMPLEMENTED;
638 static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
639 const struct smb_filename *fname,
640 TALLOC_CTX *mem_ctx,
641 struct readdir_attr_data **pattr_data)
643 return NT_STATUS_NOT_IMPLEMENTED;
646 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
647 uint32 security_info,
648 TALLOC_CTX *mem_ctx,
649 struct security_descriptor **ppdesc)
651 return NT_STATUS_NOT_IMPLEMENTED;
654 static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
655 const char *name, uint32 security_info,
656 TALLOC_CTX *mem_ctx,
657 struct security_descriptor **ppdesc)
659 return NT_STATUS_NOT_IMPLEMENTED;
662 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
663 uint32 security_info_sent,
664 const struct security_descriptor *psd)
666 return NT_STATUS_NOT_IMPLEMENTED;
669 static int skel_chmod_acl(vfs_handle_struct *handle, const char *name,
670 mode_t mode)
672 errno = ENOSYS;
673 return -1;
676 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
677 mode_t mode)
679 errno = ENOSYS;
680 return -1;
683 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
684 const char *path_p,
685 SMB_ACL_TYPE_T type,
686 TALLOC_CTX *mem_ctx)
688 errno = ENOSYS;
689 return (SMB_ACL_T) NULL;
692 static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
693 files_struct *fsp, TALLOC_CTX *mem_ctx)
695 errno = ENOSYS;
696 return (SMB_ACL_T) NULL;
699 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
700 const char *path_p, TALLOC_CTX *mem_ctx,
701 char **blob_description, DATA_BLOB *blob)
703 errno = ENOSYS;
704 return -1;
707 static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
708 files_struct *fsp, TALLOC_CTX *mem_ctx,
709 char **blob_description, DATA_BLOB *blob)
711 errno = ENOSYS;
712 return -1;
715 static int skel_sys_acl_set_file(vfs_handle_struct *handle, const char *name,
716 SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
718 errno = ENOSYS;
719 return -1;
722 static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
723 SMB_ACL_T theacl)
725 errno = ENOSYS;
726 return -1;
729 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,
730 const char *path)
732 errno = ENOSYS;
733 return -1;
736 static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path,
737 const char *name, void *value, size_t size)
739 errno = ENOSYS;
740 return -1;
743 static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
744 struct files_struct *fsp, const char *name,
745 void *value, size_t size)
747 errno = ENOSYS;
748 return -1;
751 static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path,
752 char *list, size_t size)
754 errno = ENOSYS;
755 return -1;
758 static ssize_t skel_flistxattr(vfs_handle_struct *handle,
759 struct files_struct *fsp, char *list,
760 size_t size)
762 errno = ENOSYS;
763 return -1;
766 static int skel_removexattr(vfs_handle_struct *handle, const char *path,
767 const char *name)
769 errno = ENOSYS;
770 return -1;
773 static int skel_fremovexattr(vfs_handle_struct *handle,
774 struct files_struct *fsp, const char *name)
776 errno = ENOSYS;
777 return -1;
778 return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
781 static int skel_setxattr(vfs_handle_struct *handle, const char *path,
782 const char *name, const void *value, size_t size,
783 int flags)
785 errno = ENOSYS;
786 return -1;
789 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,
790 const char *name, const void *value, size_t size,
791 int flags)
793 errno = ENOSYS;
794 return -1;
797 static bool skel_aio_force(struct vfs_handle_struct *handle,
798 struct files_struct *fsp)
800 errno = ENOSYS;
801 return false;
804 static bool skel_is_offline(struct vfs_handle_struct *handle,
805 const struct smb_filename *fname,
806 SMB_STRUCT_STAT *sbuf)
808 errno = ENOSYS;
809 return false;
812 static int skel_set_offline(struct vfs_handle_struct *handle,
813 const struct smb_filename *fname)
815 errno = ENOSYS;
816 return -1;
819 /* VFS operations structure */
821 struct vfs_fn_pointers skel_opaque_fns = {
822 /* Disk operations */
824 .connect_fn = skel_connect,
825 .disconnect_fn = skel_disconnect,
826 .disk_free_fn = skel_disk_free,
827 .get_quota_fn = skel_get_quota,
828 .set_quota_fn = skel_set_quota,
829 .get_shadow_copy_data_fn = skel_get_shadow_copy_data,
830 .statvfs_fn = skel_statvfs,
831 .fs_capabilities_fn = skel_fs_capabilities,
832 .get_dfs_referrals_fn = skel_get_dfs_referrals,
834 /* Directory operations */
836 .opendir_fn = skel_opendir,
837 .fdopendir_fn = skel_fdopendir,
838 .readdir_fn = skel_readdir,
839 .seekdir_fn = skel_seekdir,
840 .telldir_fn = skel_telldir,
841 .rewind_dir_fn = skel_rewind_dir,
842 .mkdir_fn = skel_mkdir,
843 .rmdir_fn = skel_rmdir,
844 .closedir_fn = skel_closedir,
845 .init_search_op_fn = skel_init_search_op,
847 /* File operations */
849 .open_fn = skel_open,
850 .create_file_fn = skel_create_file,
851 .close_fn = skel_close_fn,
852 .read_fn = skel_vfs_read,
853 .pread_fn = skel_pread,
854 .pread_send_fn = skel_pread_send,
855 .pread_recv_fn = skel_pread_recv,
856 .write_fn = skel_write,
857 .pwrite_fn = skel_pwrite,
858 .pwrite_send_fn = skel_pwrite_send,
859 .pwrite_recv_fn = skel_pwrite_recv,
860 .lseek_fn = skel_lseek,
861 .sendfile_fn = skel_sendfile,
862 .recvfile_fn = skel_recvfile,
863 .rename_fn = skel_rename,
864 .fsync_fn = skel_fsync,
865 .fsync_send_fn = skel_fsync_send,
866 .fsync_recv_fn = skel_fsync_recv,
867 .stat_fn = skel_stat,
868 .fstat_fn = skel_fstat,
869 .lstat_fn = skel_lstat,
870 .get_alloc_size_fn = skel_get_alloc_size,
871 .unlink_fn = skel_unlink,
872 .chmod_fn = skel_chmod,
873 .fchmod_fn = skel_fchmod,
874 .chown_fn = skel_chown,
875 .fchown_fn = skel_fchown,
876 .lchown_fn = skel_lchown,
877 .chdir_fn = skel_chdir,
878 .getwd_fn = skel_getwd,
879 .ntimes_fn = skel_ntimes,
880 .ftruncate_fn = skel_ftruncate,
881 .fallocate_fn = skel_fallocate,
882 .lock_fn = skel_lock,
883 .kernel_flock_fn = skel_kernel_flock,
884 .linux_setlease_fn = skel_linux_setlease,
885 .getlock_fn = skel_getlock,
886 .symlink_fn = skel_symlink,
887 .readlink_fn = skel_vfs_readlink,
888 .link_fn = skel_link,
889 .mknod_fn = skel_mknod,
890 .realpath_fn = skel_realpath,
891 .notify_watch_fn = skel_notify_watch,
892 .chflags_fn = skel_chflags,
893 .file_id_create_fn = skel_file_id_create,
894 .copy_chunk_send_fn = skel_copy_chunk_send,
895 .copy_chunk_recv_fn = skel_copy_chunk_recv,
896 .get_compression_fn = skel_get_compression,
897 .set_compression_fn = skel_set_compression,
899 .streaminfo_fn = skel_streaminfo,
900 .get_real_filename_fn = skel_get_real_filename,
901 .connectpath_fn = skel_connectpath,
902 .brl_lock_windows_fn = skel_brl_lock_windows,
903 .brl_unlock_windows_fn = skel_brl_unlock_windows,
904 .brl_cancel_windows_fn = skel_brl_cancel_windows,
905 .strict_lock_fn = skel_strict_lock,
906 .strict_unlock_fn = skel_strict_unlock,
907 .translate_name_fn = skel_translate_name,
908 .fsctl_fn = skel_fsctl,
909 .readdir_attr_fn = skel_readdir_attr,
911 /* NT ACL operations. */
913 .fget_nt_acl_fn = skel_fget_nt_acl,
914 .get_nt_acl_fn = skel_get_nt_acl,
915 .fset_nt_acl_fn = skel_fset_nt_acl,
917 /* POSIX ACL operations. */
919 .chmod_acl_fn = skel_chmod_acl,
920 .fchmod_acl_fn = skel_fchmod_acl,
922 .sys_acl_get_file_fn = skel_sys_acl_get_file,
923 .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
924 .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
925 .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
926 .sys_acl_set_file_fn = skel_sys_acl_set_file,
927 .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
928 .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
930 /* EA operations. */
931 .getxattr_fn = skel_getxattr,
932 .fgetxattr_fn = skel_fgetxattr,
933 .listxattr_fn = skel_listxattr,
934 .flistxattr_fn = skel_flistxattr,
935 .removexattr_fn = skel_removexattr,
936 .fremovexattr_fn = skel_fremovexattr,
937 .setxattr_fn = skel_setxattr,
938 .fsetxattr_fn = skel_fsetxattr,
940 /* aio operations */
941 .aio_force_fn = skel_aio_force,
943 /* offline operations */
944 .is_offline_fn = skel_is_offline,
945 .set_offline_fn = skel_set_offline
948 NTSTATUS vfs_skel_opaque_init(void)
950 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
951 &skel_opaque_fns);