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