examples: Re-indent and reformat skel VFS modules
[gd/samba-autobuild/.git] / examples / VFS / skel_opaque.c
1 /* 
2  * Skeleton VFS module.  Implements dummy versions of all VFS
3  * functions.
4  *
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
9  *
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.
14  *  
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.
19  *  
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/>.
22  */
23
24 #include "../source3/include/includes.h"
25
26 /* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE 
27    SAMBA DEVELOPERS GUIDE!!!!!!
28  */
29
30 /* If you take this file as template for your module
31  * you must re-implement every function.
32  */
33
34 static int skel_connect(vfs_handle_struct *handle, const char *service,
35                         const char *user)
36 {
37         errno = ENOSYS;
38         return -1;
39 }
40
41 static void skel_disconnect(vfs_handle_struct *handle)
42 {
43         ;
44 }
45
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)
49 {
50         *bsize = 0;
51         *dfree = 0;
52         *dsize = 0;
53         return 0;
54 }
55
56 static int skel_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
57                           unid_t id, SMB_DISK_QUOTA *dq)
58 {
59         errno = ENOSYS;
60         return -1;
61 }
62
63 static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
64                           unid_t id, SMB_DISK_QUOTA *dq)
65 {
66         errno = ENOSYS;
67         return -1;
68 }
69
70 static int skel_get_shadow_copy_data(vfs_handle_struct *handle,
71                                      files_struct *fsp,
72                                      struct shadow_copy_data *shadow_copy_data,
73                                      bool labels)
74 {
75         errno = ENOSYS;
76         return -1;
77 }
78
79 static int skel_statvfs(struct vfs_handle_struct *handle,
80                         const char *path, struct vfs_statvfs_struct *statbuf)
81 {
82         errno = ENOSYS;
83         return -1;
84 }
85
86 static uint32_t skel_fs_capabilities(struct vfs_handle_struct *handle,
87                                      enum timestamp_set_resolution *p_ts_res)
88 {
89         return 0;
90 }
91
92 static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
93                                        struct dfs_GetDFSReferral *r)
94 {
95         return NT_STATUS_NOT_IMPLEMENTED;
96 }
97
98 static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname,
99                          const char *mask, uint32 attr)
100 {
101         return NULL;
102 }
103
104 static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
105                            const char *mask, uint32 attr)
106 {
107         return NULL;
108 }
109
110 static struct dirent *skel_readdir(vfs_handle_struct *handle,
111                                    DIR *dirp, SMB_STRUCT_STAT *sbuf)
112 {
113         return NULL;
114 }
115
116 static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
117 {
118         ;
119 }
120
121 static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
122 {
123         return (long)-1;
124 }
125
126 static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
127 {
128         ;
129 }
130
131 static int skel_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode)
132 {
133         errno = ENOSYS;
134         return -1;
135 }
136
137 static int skel_rmdir(vfs_handle_struct *handle, const char *path)
138 {
139         errno = ENOSYS;
140         return -1;
141 }
142
143 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
144 {
145         errno = ENOSYS;
146         return -1;
147 }
148
149 static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
150 {
151         ;
152 }
153
154 static int skel_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
155                      files_struct *fsp, int flags, mode_t mode)
156 {
157         errno = ENOSYS;
158         return -1;
159 }
160
161 static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
162                                  struct smb_request *req,
163                                  uint16_t root_dir_fid,
164                                  struct smb_filename *smb_fname,
165                                  uint32_t access_mask,
166                                  uint32_t share_access,
167                                  uint32_t create_disposition,
168                                  uint32_t create_options,
169                                  uint32_t file_attributes,
170                                  uint32_t oplock_request,
171                                  uint64_t allocation_size,
172                                  uint32_t private_flags,
173                                  struct security_descriptor *sd,
174                                  struct ea_list *ea_list,
175                                  files_struct **result, int *pinfo)
176 {
177         return NT_STATUS_NOT_IMPLEMENTED;
178 }
179
180 static int skel_close_fn(vfs_handle_struct *handle, files_struct *fsp)
181 {
182         errno = ENOSYS;
183         return -1;
184 }
185
186 static ssize_t skel_vfs_read(vfs_handle_struct *handle, files_struct *fsp,
187                              void *data, size_t n)
188 {
189         errno = ENOSYS;
190         return -1;
191 }
192
193 static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp,
194                           void *data, size_t n, off_t offset)
195 {
196         errno = ENOSYS;
197         return -1;
198 }
199
200 static struct tevent_req *skel_pread_send(struct vfs_handle_struct *handle,
201                                           TALLOC_CTX *mem_ctx,
202                                           struct tevent_context *ev,
203                                           struct files_struct *fsp,
204                                           void *data, size_t n, off_t offset)
205 {
206         return NULL;
207 }
208
209 static ssize_t skel_pread_recv(struct tevent_req *req, int *err)
210 {
211         *err = ENOSYS;
212         return -1;
213 }
214
215 static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp,
216                           const void *data, size_t n)
217 {
218         errno = ENOSYS;
219         return -1;
220 }
221
222 static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp,
223                            const void *data, size_t n, off_t offset)
224 {
225         errno = ENOSYS;
226         return -1;
227 }
228
229 static struct tevent_req *skel_pwrite_send(struct vfs_handle_struct *handle,
230                                            TALLOC_CTX *mem_ctx,
231                                            struct tevent_context *ev,
232                                            struct files_struct *fsp,
233                                            const void *data,
234                                            size_t n, off_t offset)
235 {
236         return NULL;
237 }
238
239 static ssize_t skel_pwrite_recv(struct tevent_req *req, int *err)
240 {
241         *err = ENOSYS;
242         return -1;
243 }
244
245 static off_t skel_lseek(vfs_handle_struct *handle, files_struct *fsp,
246                         off_t offset, int whence)
247 {
248         errno = ENOSYS;
249         return (off_t) - 1;
250 }
251
252 static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd,
253                              files_struct *fromfsp, const DATA_BLOB *hdr,
254                              off_t offset, size_t n)
255 {
256         errno = ENOSYS;
257         return -1;
258 }
259
260 static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd,
261                              files_struct *tofsp, off_t offset, size_t n)
262 {
263         errno = ENOSYS;
264         return -1;
265 }
266
267 static int skel_rename(vfs_handle_struct *handle,
268                        const struct smb_filename *smb_fname_src,
269                        const struct smb_filename *smb_fname_dst)
270 {
271         errno = ENOSYS;
272         return -1;
273 }
274
275 static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
276 {
277         errno = ENOSYS;
278         return -1;
279 }
280
281 static struct tevent_req *skel_fsync_send(struct vfs_handle_struct *handle,
282                                           TALLOC_CTX *mem_ctx,
283                                           struct tevent_context *ev,
284                                           struct files_struct *fsp)
285 {
286         return NULL;
287 }
288
289 static int skel_fsync_recv(struct tevent_req *req, int *err)
290 {
291         *err = ENOSYS;
292         return -1;
293 }
294
295 static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
296 {
297         errno = ENOSYS;
298         return -1;
299 }
300
301 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp,
302                       SMB_STRUCT_STAT *sbuf)
303 {
304         errno = ENOSYS;
305         return -1;
306 }
307
308 static int skel_lstat(vfs_handle_struct *handle,
309                       struct smb_filename *smb_fname)
310 {
311         errno = ENOSYS;
312         return -1;
313 }
314
315 static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle,
316                                     struct files_struct *fsp,
317                                     const SMB_STRUCT_STAT *sbuf)
318 {
319         errno = ENOSYS;
320         return -1;
321 }
322
323 static int skel_unlink(vfs_handle_struct *handle,
324                        const struct smb_filename *smb_fname)
325 {
326         errno = ENOSYS;
327         return -1;
328 }
329
330 static int skel_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
331 {
332         errno = ENOSYS;
333         return -1;
334 }
335
336 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
337                        mode_t mode)
338 {
339         errno = ENOSYS;
340         return -1;
341 }
342
343 static int skel_chown(vfs_handle_struct *handle, const char *path,
344                       uid_t uid, gid_t gid)
345 {
346         errno = ENOSYS;
347         return -1;
348 }
349
350 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp,
351                        uid_t uid, gid_t gid)
352 {
353         errno = ENOSYS;
354         return -1;
355 }
356
357 static int skel_lchown(vfs_handle_struct *handle, const char *path,
358                        uid_t uid, gid_t gid)
359 {
360         errno = ENOSYS;
361         return -1;
362 }
363
364 static int skel_chdir(vfs_handle_struct *handle, const char *path)
365 {
366         errno = ENOSYS;
367         return -1;
368 }
369
370 static char *skel_getwd(vfs_handle_struct *handle)
371 {
372         errno = ENOSYS;
373         return NULL;
374 }
375
376 static int skel_ntimes(vfs_handle_struct *handle,
377                        const struct smb_filename *smb_fname,
378                        struct smb_file_time *ft)
379 {
380         errno = ENOSYS;
381         return -1;
382 }
383
384 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
385                           off_t offset)
386 {
387         errno = ENOSYS;
388         return -1;
389 }
390
391 static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
392                           enum vfs_fallocate_mode mode, off_t offset, off_t len)
393 {
394         errno = ENOSYS;
395         return -1;
396 }
397
398 static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op,
399                       off_t offset, off_t count, int type)
400 {
401         errno = ENOSYS;
402         return false;
403 }
404
405 static int skel_kernel_flock(struct vfs_handle_struct *handle,
406                              struct files_struct *fsp,
407                              uint32 share_mode, uint32 access_mask)
408 {
409         errno = ENOSYS;
410         return -1;
411 }
412
413 static int skel_linux_setlease(struct vfs_handle_struct *handle,
414                                struct files_struct *fsp, int leasetype)
415 {
416         errno = ENOSYS;
417         return -1;
418 }
419
420 static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp,
421                          off_t *poffset, off_t *pcount, int *ptype,
422                          pid_t *ppid)
423 {
424         errno = ENOSYS;
425         return false;
426 }
427
428 static int skel_symlink(vfs_handle_struct *handle, const char *oldpath,
429                         const char *newpath)
430 {
431         errno = ENOSYS;
432         return -1;
433 }
434
435 static int skel_vfs_readlink(vfs_handle_struct *handle, const char *path,
436                              char *buf, size_t bufsiz)
437 {
438         errno = ENOSYS;
439         return -1;
440 }
441
442 static int skel_link(vfs_handle_struct *handle, const char *oldpath,
443                      const char *newpath)
444 {
445         errno = ENOSYS;
446         return -1;
447 }
448
449 static int skel_mknod(vfs_handle_struct *handle, const char *path, mode_t mode,
450                       SMB_DEV_T dev)
451 {
452         errno = ENOSYS;
453         return -1;
454 }
455
456 static char *skel_realpath(vfs_handle_struct *handle, const char *path)
457 {
458         errno = ENOSYS;
459         return NULL;
460 }
461
462 static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle,
463                                   struct sys_notify_context *ctx,
464                                   const char *path,
465                                   uint32_t *filter,
466                                   uint32_t *subdir_filter,
467                                   void (*callback) (struct sys_notify_context *
468                                                     ctx, void *private_data,
469                                                     struct notify_event *ev),
470                                   void *private_data, void *handle_p)
471 {
472         return NT_STATUS_NOT_IMPLEMENTED;
473 }
474
475 static int skel_chflags(vfs_handle_struct *handle, const char *path,
476                         uint flags)
477 {
478         errno = ENOSYS;
479         return -1;
480 }
481
482 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
483                                           const SMB_STRUCT_STAT *sbuf)
484 {
485         struct file_id id;
486         ZERO_STRUCT(id);
487         errno = ENOSYS;
488         return id;
489 }
490
491 static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
492                                 struct files_struct *fsp,
493                                 const char *fname,
494                                 TALLOC_CTX *mem_ctx,
495                                 unsigned int *num_streams,
496                                 struct stream_struct **streams)
497 {
498         return NT_STATUS_NOT_IMPLEMENTED;
499 }
500
501 static int skel_get_real_filename(struct vfs_handle_struct *handle,
502                                   const char *path,
503                                   const char *name,
504                                   TALLOC_CTX *mem_ctx, char **found_name)
505 {
506         errno = ENOSYS;
507         return -1;
508 }
509
510 static const char *skel_connectpath(struct vfs_handle_struct *handle,
511                                     const char *filename)
512 {
513         errno = ENOSYS;
514         return NULL;
515 }
516
517 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
518                                       struct byte_range_lock *br_lck,
519                                       struct lock_struct *plock,
520                                       bool blocking_lock,
521                                       struct blocking_lock_record *blr)
522 {
523         return NT_STATUS_NOT_IMPLEMENTED;
524 }
525
526 static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
527                                     struct messaging_context *msg_ctx,
528                                     struct byte_range_lock *br_lck,
529                                     const struct lock_struct *plock)
530 {
531         errno = ENOSYS;
532         return false;
533 }
534
535 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
536                                     struct byte_range_lock *br_lck,
537                                     struct lock_struct *plock,
538                                     struct blocking_lock_record *blr)
539 {
540         errno = ENOSYS;
541         return false;
542 }
543
544 static bool skel_strict_lock(struct vfs_handle_struct *handle,
545                              struct files_struct *fsp,
546                              struct lock_struct *plock)
547 {
548         errno = ENOSYS;
549         return false;
550 }
551
552 static void skel_strict_unlock(struct vfs_handle_struct *handle,
553                                struct files_struct *fsp,
554                                struct lock_struct *plock)
555 {
556         ;
557 }
558
559 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
560                                     const char *mapped_name,
561                                     enum vfs_translate_direction direction,
562                                     TALLOC_CTX *mem_ctx, char **pmapped_name)
563 {
564         return NT_STATUS_NOT_IMPLEMENTED;
565 }
566
567 static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
568                            struct files_struct *fsp,
569                            TALLOC_CTX *ctx,
570                            uint32_t function,
571                            uint16_t req_flags,  /* Needed for UNICODE ... */
572                            const uint8_t *_in_data,
573                            uint32_t in_len,
574                            uint8_t **_out_data,
575                            uint32_t max_out_len, uint32_t *out_len)
576 {
577         return NT_STATUS_NOT_IMPLEMENTED;
578 }
579
580 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
581                                  uint32 security_info,
582                                  TALLOC_CTX *mem_ctx,
583                                  struct security_descriptor **ppdesc)
584 {
585         return NT_STATUS_NOT_IMPLEMENTED;
586 }
587
588 static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
589                                 const char *name, uint32 security_info,
590                                 TALLOC_CTX *mem_ctx,
591                                 struct security_descriptor **ppdesc)
592 {
593         return NT_STATUS_NOT_IMPLEMENTED;
594 }
595
596 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
597                                  uint32 security_info_sent,
598                                  const struct security_descriptor *psd)
599 {
600         return NT_STATUS_NOT_IMPLEMENTED;
601 }
602
603 static int skel_chmod_acl(vfs_handle_struct *handle, const char *name,
604                           mode_t mode)
605 {
606         errno = ENOSYS;
607         return -1;
608 }
609
610 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
611                            mode_t mode)
612 {
613         errno = ENOSYS;
614         return -1;
615 }
616
617 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
618                                        const char *path_p,
619                                        SMB_ACL_TYPE_T type,
620                                        TALLOC_CTX *mem_ctx)
621 {
622         errno = ENOSYS;
623         return (SMB_ACL_T) NULL;
624 }
625
626 static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
627                                      files_struct *fsp, TALLOC_CTX *mem_ctx)
628 {
629         errno = ENOSYS;
630         return (SMB_ACL_T) NULL;
631 }
632
633 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
634                                       const char *path_p, TALLOC_CTX *mem_ctx,
635                                       char **blob_description, DATA_BLOB *blob)
636 {
637         errno = ENOSYS;
638         return -1;
639 }
640
641 static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
642                                     files_struct *fsp, TALLOC_CTX *mem_ctx,
643                                     char **blob_description, DATA_BLOB *blob)
644 {
645         errno = ENOSYS;
646         return -1;
647 }
648
649 static int skel_sys_acl_set_file(vfs_handle_struct *handle, const char *name,
650                                  SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
651 {
652         errno = ENOSYS;
653         return -1;
654 }
655
656 static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
657                                SMB_ACL_T theacl)
658 {
659         errno = ENOSYS;
660         return -1;
661 }
662
663 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,
664                                         const char *path)
665 {
666         errno = ENOSYS;
667         return -1;
668 }
669
670 static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path,
671                              const char *name, void *value, size_t size)
672 {
673         errno = ENOSYS;
674         return -1;
675 }
676
677 static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
678                               struct files_struct *fsp, const char *name,
679                               void *value, size_t size)
680 {
681         errno = ENOSYS;
682         return -1;
683 }
684
685 static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path,
686                               char *list, size_t size)
687 {
688         errno = ENOSYS;
689         return -1;
690 }
691
692 static ssize_t skel_flistxattr(vfs_handle_struct *handle,
693                                struct files_struct *fsp, char *list,
694                                size_t size)
695 {
696         errno = ENOSYS;
697         return -1;
698 }
699
700 static int skel_removexattr(vfs_handle_struct *handle, const char *path,
701                             const char *name)
702 {
703         errno = ENOSYS;
704         return -1;
705 }
706
707 static int skel_fremovexattr(vfs_handle_struct *handle,
708                              struct files_struct *fsp, const char *name)
709 {
710         errno = ENOSYS;
711         return -1;
712         return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
713 }
714
715 static int skel_setxattr(vfs_handle_struct *handle, const char *path,
716                          const char *name, const void *value, size_t size,
717                          int flags)
718 {
719         errno = ENOSYS;
720         return -1;
721 }
722
723 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,
724                           const char *name, const void *value, size_t size,
725                           int flags)
726 {
727         errno = ENOSYS;
728         return -1;
729 }
730
731 static bool skel_aio_force(struct vfs_handle_struct *handle,
732                            struct files_struct *fsp)
733 {
734         errno = ENOSYS;
735         return false;
736 }
737
738 static bool skel_is_offline(struct vfs_handle_struct *handle,
739                             const struct smb_filename *fname,
740                             SMB_STRUCT_STAT *sbuf)
741 {
742         errno = ENOSYS;
743         return false;
744 }
745
746 static int skel_set_offline(struct vfs_handle_struct *handle,
747                             const struct smb_filename *fname)
748 {
749         errno = ENOSYS;
750         return -1;
751 }
752
753 /* VFS operations structure */
754
755 struct vfs_fn_pointers skel_opaque_fns = {
756         /* Disk operations */
757
758         .connect_fn = skel_connect,
759         .disconnect_fn = skel_disconnect,
760         .disk_free_fn = skel_disk_free,
761         .get_quota_fn = skel_get_quota,
762         .set_quota_fn = skel_set_quota,
763         .get_shadow_copy_data_fn = skel_get_shadow_copy_data,
764         .statvfs_fn = skel_statvfs,
765         .fs_capabilities_fn = skel_fs_capabilities,
766         .get_dfs_referrals_fn = skel_get_dfs_referrals,
767
768         /* Directory operations */
769
770         .opendir_fn = skel_opendir,
771         .fdopendir_fn = skel_fdopendir,
772         .readdir_fn = skel_readdir,
773         .seekdir_fn = skel_seekdir,
774         .telldir_fn = skel_telldir,
775         .rewind_dir_fn = skel_rewind_dir,
776         .mkdir_fn = skel_mkdir,
777         .rmdir_fn = skel_rmdir,
778         .closedir_fn = skel_closedir,
779         .init_search_op_fn = skel_init_search_op,
780
781         /* File operations */
782
783         .open_fn = skel_open,
784         .create_file_fn = skel_create_file,
785         .close_fn = skel_close_fn,
786         .read_fn = skel_vfs_read,
787         .pread_fn = skel_pread,
788         .pread_send_fn = skel_pread_send,
789         .pread_recv_fn = skel_pread_recv,
790         .write_fn = skel_write,
791         .pwrite_fn = skel_pwrite,
792         .pwrite_send_fn = skel_pwrite_send,
793         .pwrite_recv_fn = skel_pwrite_recv,
794         .lseek_fn = skel_lseek,
795         .sendfile_fn = skel_sendfile,
796         .recvfile_fn = skel_recvfile,
797         .rename_fn = skel_rename,
798         .fsync_fn = skel_fsync,
799         .fsync_send_fn = skel_fsync_send,
800         .fsync_recv_fn = skel_fsync_recv,
801         .stat_fn = skel_stat,
802         .fstat_fn = skel_fstat,
803         .lstat_fn = skel_lstat,
804         .get_alloc_size_fn = skel_get_alloc_size,
805         .unlink_fn = skel_unlink,
806         .chmod_fn = skel_chmod,
807         .fchmod_fn = skel_fchmod,
808         .chown_fn = skel_chown,
809         .fchown_fn = skel_fchown,
810         .lchown_fn = skel_lchown,
811         .chdir_fn = skel_chdir,
812         .getwd_fn = skel_getwd,
813         .ntimes_fn = skel_ntimes,
814         .ftruncate_fn = skel_ftruncate,
815         .fallocate_fn = skel_fallocate,
816         .lock_fn = skel_lock,
817         .kernel_flock_fn = skel_kernel_flock,
818         .linux_setlease_fn = skel_linux_setlease,
819         .getlock_fn = skel_getlock,
820         .symlink_fn = skel_symlink,
821         .readlink_fn = skel_vfs_readlink,
822         .link_fn = skel_link,
823         .mknod_fn = skel_mknod,
824         .realpath_fn = skel_realpath,
825         .notify_watch_fn = skel_notify_watch,
826         .chflags_fn = skel_chflags,
827         .file_id_create_fn = skel_file_id_create,
828
829         .streaminfo_fn = skel_streaminfo,
830         .get_real_filename_fn = skel_get_real_filename,
831         .connectpath_fn = skel_connectpath,
832         .brl_lock_windows_fn = skel_brl_lock_windows,
833         .brl_unlock_windows_fn = skel_brl_unlock_windows,
834         .brl_cancel_windows_fn = skel_brl_cancel_windows,
835         .strict_lock_fn = skel_strict_lock,
836         .strict_unlock_fn = skel_strict_unlock,
837         .translate_name_fn = skel_translate_name,
838         .fsctl_fn = skel_fsctl,
839
840         /* NT ACL operations. */
841
842         .fget_nt_acl_fn = skel_fget_nt_acl,
843         .get_nt_acl_fn = skel_get_nt_acl,
844         .fset_nt_acl_fn = skel_fset_nt_acl,
845
846         /* POSIX ACL operations. */
847
848         .chmod_acl_fn = skel_chmod_acl,
849         .fchmod_acl_fn = skel_fchmod_acl,
850
851         .sys_acl_get_file_fn = skel_sys_acl_get_file,
852         .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
853         .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
854         .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
855         .sys_acl_set_file_fn = skel_sys_acl_set_file,
856         .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
857         .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
858
859         /* EA operations. */
860         .getxattr_fn = skel_getxattr,
861         .fgetxattr_fn = skel_fgetxattr,
862         .listxattr_fn = skel_listxattr,
863         .flistxattr_fn = skel_flistxattr,
864         .removexattr_fn = skel_removexattr,
865         .fremovexattr_fn = skel_fremovexattr,
866         .setxattr_fn = skel_setxattr,
867         .fsetxattr_fn = skel_fsetxattr,
868
869         /* aio operations */
870         .aio_force_fn = skel_aio_force,
871
872         /* offline operations */
873         .is_offline_fn = skel_is_offline,
874         .set_offline_fn = skel_set_offline
875 };
876
877 NTSTATUS vfs_skel_opaque_init(void)
878 {
879         return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
880                                 &skel_opaque_fns);
881 }