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