Move the uglyness of #ifdef REALPATH_TAKES_NULL into the vfs_default
[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
25 #include "includes.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, 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, unid_t id, SMB_DISK_QUOTA *dq)
57 {
58         errno = ENOSYS;
59         return -1;
60 }
61
62 static int skel_set_quota(vfs_handle_struct *handle,  enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq)
63 {
64         errno = ENOSYS;
65         return -1;
66 }
67
68 static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
69 {
70         errno = ENOSYS;
71         return -1;
72 }
73
74 static int skel_statvfs(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf)
75 {
76         errno = ENOSYS;
77         return -1;
78 }
79
80 static uint32_t skel_fs_capabilities(struct vfs_handle_struct *handle, enum timestamp_set_resolution *p_ts_res)
81 {
82         return 0;
83 }
84
85 static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle,  const char *fname, const char *mask, uint32 attr)
86 {
87         return NULL;
88 }
89
90 static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
91                                        SMB_STRUCT_DIR *dirp,
92                                        SMB_STRUCT_STAT *sbuf)
93 {
94         return NULL;
95 }
96
97 static void skel_seekdir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dirp, long offset)
98 {
99         ;
100 }
101
102 static long skel_telldir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dirp)
103 {
104         return (long)-1;
105 }
106
107 static void skel_rewind_dir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
108 {
109         ;
110 }
111
112 static int skel_mkdir(vfs_handle_struct *handle,  const char *path, mode_t mode)
113 {
114         errno = ENOSYS;
115         return -1;
116 }
117
118 static int skel_rmdir(vfs_handle_struct *handle,  const char *path)
119 {
120         errno = ENOSYS;
121         return -1;
122 }
123
124 static int skel_closedir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dir)
125 {
126         errno = ENOSYS;
127         return -1;
128 }
129
130 static void skel_init_search_op(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
131 {
132         ;
133 }
134
135 static int skel_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
136                      files_struct *fsp, int flags, mode_t mode)
137 {
138         errno = ENOSYS;
139         return -1;
140 }
141
142 static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
143                                 struct smb_request *req,
144                                 uint16_t root_dir_fid,
145                                 struct smb_filename *smb_fname,
146                                 uint32_t access_mask,
147                                 uint32_t share_access,
148                                 uint32_t create_disposition,
149                                 uint32_t create_options,
150                                 uint32_t file_attributes,
151                                 uint32_t oplock_request,
152                                 uint64_t allocation_size,
153                                 uint32_t private_flags,
154                                 struct security_descriptor *sd,
155                                 struct ea_list *ea_list,
156                                 files_struct **result,
157                                 int *pinfo)
158 {
159         return NT_STATUS_NOT_IMPLEMENTED;
160 }
161
162 static int skel_close_fn(vfs_handle_struct *handle, files_struct *fsp)
163 {
164         errno = ENOSYS;
165         return -1;
166 }
167
168 static ssize_t skel_vfs_read(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n)
169 {
170         errno = ENOSYS;
171         return -1;
172 }
173
174 static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n, SMB_OFF_T offset)
175 {
176         errno = ENOSYS;
177         return -1;
178 }
179
180 static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n)
181 {
182         errno = ENOSYS;
183         return -1;
184 }
185
186 static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n, SMB_OFF_T offset)
187 {
188         errno = ENOSYS;
189         return -1;
190 }
191
192 static SMB_OFF_T skel_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T offset, int whence)
193 {
194         errno = ENOSYS;
195         return (SMB_OFF_T)-1;
196 }
197
198 static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *hdr, SMB_OFF_T offset, size_t n)
199 {
200         errno = ENOSYS;
201         return -1;
202 }
203
204 static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct *tofsp, SMB_OFF_T offset, size_t n)
205 {
206         errno = ENOSYS;
207         return -1;
208 }
209
210 static int skel_rename(vfs_handle_struct *handle,
211                        const struct smb_filename *smb_fname_src,
212                        const struct smb_filename *smb_fname_dst)
213 {
214         errno = ENOSYS;
215         return -1;
216 }
217
218 static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
219 {
220         errno = ENOSYS;
221         return -1;
222 }
223
224 static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
225 {
226         errno = ENOSYS;
227         return -1;
228 }
229
230 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf)
231 {
232         errno = ENOSYS;
233         return -1;
234 }
235
236 static int skel_lstat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
237 {
238         errno = ENOSYS;
239         return -1;
240 }
241
242 static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_STAT *sbuf)
243 {
244         errno = ENOSYS;
245         return -1;
246 }
247
248 static int skel_unlink(vfs_handle_struct *handle,
249                        const struct smb_filename *smb_fname)
250 {
251         errno = ENOSYS;
252         return -1;
253 }
254
255 static int skel_chmod(vfs_handle_struct *handle,  const char *path, mode_t mode)
256 {
257         errno = ENOSYS;
258         return -1;
259 }
260
261 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
262 {
263         errno = ENOSYS;
264         return -1;
265 }
266
267 static int skel_chown(vfs_handle_struct *handle,  const char *path, uid_t uid, gid_t gid)
268 {
269         errno = ENOSYS;
270         return -1;
271 }
272
273 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp, uid_t uid, gid_t gid)
274 {
275         errno = ENOSYS;
276         return -1;
277 }
278
279 static int skel_lchown(vfs_handle_struct *handle,  const char *path, uid_t uid, gid_t gid)
280 {
281         errno = ENOSYS;
282         return -1;
283 }
284
285 static int skel_chdir(vfs_handle_struct *handle,  const char *path)
286 {
287         errno = ENOSYS;
288         return -1;
289 }
290
291 static char *skel_getwd(vfs_handle_struct *handle,  char *buf)
292 {
293         errno = ENOSYS;
294         return NULL;
295 }
296
297 static int skel_ntimes(vfs_handle_struct *handle,
298                        const struct smb_filename *smb_fname,
299                        struct smb_file_time *ft)
300 {
301         errno = ENOSYS;
302         return -1;
303 }
304
305 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T offset)
306 {
307         errno = ENOSYS;
308         return -1;
309 }
310
311 static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
312 {
313         errno = ENOSYS;
314         return false;
315 }
316
317 static int skel_kernel_flock(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32 share_mode, uint32 access_mask)
318 {
319         errno = ENOSYS;
320         return -1;
321 }
322
323 static int skel_linux_setlease(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype)
324 {
325         errno = ENOSYS;
326         return -1;
327 }
328
329 static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
330 {
331         errno = ENOSYS;
332         return false;
333 }
334
335 static int skel_symlink(vfs_handle_struct *handle,  const char *oldpath, const char *newpath)
336 {
337         errno = ENOSYS;
338         return -1;
339 }
340
341 static int skel_vfs_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz)
342 {
343         errno = ENOSYS;
344         return -1;
345 }
346
347 static int skel_link(vfs_handle_struct *handle,  const char *oldpath, const char *newpath)
348 {
349         errno = ENOSYS;
350         return -1;
351 }
352
353 static int skel_mknod(vfs_handle_struct *handle,  const char *path, mode_t mode, SMB_DEV_T dev)
354 {
355         errno = ENOSYS;
356         return -1;
357 }
358
359 static char *skel_realpath(vfs_handle_struct *handle,  const char *path)
360 {
361         errno = ENOSYS;
362         return NULL;
363 }
364
365 static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle,
366             struct sys_notify_context *ctx, struct notify_entry *e,
367             void (*callback)(struct sys_notify_context *ctx, void *private_data, struct notify_event *ev),
368             void *private_data, void *handle_p)
369 {
370         return NT_STATUS_NOT_IMPLEMENTED;
371 }
372
373 static int skel_chflags(vfs_handle_struct *handle,  const char *path, uint flags)
374 {
375         errno = ENOSYS;
376         return -1;
377 }
378
379 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
380                                           const SMB_STRUCT_STAT *sbuf)
381 {
382         struct file_id id;
383         ZERO_STRUCT(id);
384         errno = ENOSYS;
385         return id;
386 }
387
388 static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
389                                 struct files_struct *fsp,
390                                 const char *fname,
391                                 TALLOC_CTX *mem_ctx,
392                                 unsigned int *num_streams,
393                                 struct stream_struct **streams)
394 {
395         return NT_STATUS_NOT_IMPLEMENTED;
396 }
397
398 static int skel_get_real_filename(struct vfs_handle_struct *handle,
399                                 const char *path,
400                                 const char *name,
401                                 TALLOC_CTX *mem_ctx,
402                                 char **found_name)
403 {
404         errno = ENOSYS;
405         return -1;
406 }
407
408 static const char *skel_connectpath(struct vfs_handle_struct *handle,
409                                 const char *filename)
410 {
411         errno = ENOSYS;
412         return NULL;
413 }
414
415 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
416                                 struct byte_range_lock *br_lck,
417                                 struct lock_struct *plock,
418                                 bool blocking_lock,
419                                 struct blocking_lock_record *blr)
420 {
421         return NT_STATUS_NOT_IMPLEMENTED;
422 }
423
424 static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
425                                 struct messaging_context *msg_ctx,
426                                 struct byte_range_lock *br_lck,
427                                 const struct lock_struct *plock)
428 {
429         errno = ENOSYS;
430         return false;
431 }
432
433 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
434                                 struct byte_range_lock *br_lck,
435                                 struct lock_struct *plock,
436                                 struct blocking_lock_record *blr)
437 {
438         errno = ENOSYS;
439         return false;
440 }
441
442 static bool skel_strict_lock(struct vfs_handle_struct *handle,
443                                 struct files_struct *fsp,
444                                 struct lock_struct *plock)
445 {
446         errno = ENOSYS;
447         return false;
448 }
449
450 static void skel_strict_unlock(struct vfs_handle_struct *handle,
451                                 struct files_struct *fsp,
452                                 struct lock_struct *plock)
453 {
454         ;
455 }
456
457 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
458                                 const char *mapped_name,
459                                 enum vfs_translate_direction direction,
460                                 TALLOC_CTX *mem_ctx,
461                                 char **pmapped_name)
462 {
463         return NT_STATUS_NOT_IMPLEMENTED;
464 }
465
466 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
467         uint32 security_info, SEC_DESC **ppdesc)
468 {
469         return NT_STATUS_NOT_IMPLEMENTED;
470 }
471
472 static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
473         const char *name, uint32 security_info, SEC_DESC **ppdesc)
474 {
475         return NT_STATUS_NOT_IMPLEMENTED;
476 }
477
478 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
479         uint32 security_info_sent, const SEC_DESC *psd)
480 {
481         return NT_STATUS_NOT_IMPLEMENTED;
482 }
483
484 static int skel_chmod_acl(vfs_handle_struct *handle,  const char *name, mode_t mode)
485 {
486         errno = ENOSYS;
487         return -1;
488 }
489
490 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
491 {
492         errno = ENOSYS;
493         return -1;
494 }
495
496 static int skel_sys_acl_get_entry(vfs_handle_struct *handle,  SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
497 {
498         errno = ENOSYS;
499         return -1;
500 }
501
502 static int skel_sys_acl_get_tag_type(vfs_handle_struct *handle,  SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p)
503 {
504         errno = ENOSYS;
505         return -1;
506 }
507
508 static int skel_sys_acl_get_permset(vfs_handle_struct *handle,  SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p)
509 {
510         errno = ENOSYS;
511         return -1;
512 }
513
514 static void *skel_sys_acl_get_qualifier(vfs_handle_struct *handle,  SMB_ACL_ENTRY_T entry_d)
515 {
516         errno = ENOSYS;
517         return NULL;
518 }
519
520 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,  const char *path_p, SMB_ACL_TYPE_T type)
521 {
522         errno = ENOSYS;
523         return (SMB_ACL_T)NULL;
524 }
525
526 static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
527 {
528         errno = ENOSYS;
529         return (SMB_ACL_T)NULL;
530 }
531
532 static int skel_sys_acl_clear_perms(vfs_handle_struct *handle,  SMB_ACL_PERMSET_T permset)
533 {
534         errno = ENOSYS;
535         return -1;
536 }
537
538 static int skel_sys_acl_add_perm(vfs_handle_struct *handle,  SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
539 {
540         errno = ENOSYS;
541         return -1;
542 }
543
544 static char *skel_sys_acl_to_text(vfs_handle_struct *handle,  SMB_ACL_T theacl, ssize_t *plen)
545 {
546         errno = ENOSYS;
547         return NULL;
548 }
549
550 static SMB_ACL_T skel_sys_acl_init(vfs_handle_struct *handle,  int count)
551 {
552         errno = ENOSYS;
553         return (SMB_ACL_T)NULL;
554 }
555
556 static int skel_sys_acl_create_entry(vfs_handle_struct *handle,  SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry)
557 {
558         errno = ENOSYS;
559         return -1;
560 }
561
562 static int skel_sys_acl_set_tag_type(vfs_handle_struct *handle,  SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype)
563 {
564         errno = ENOSYS;
565         return -1;
566 }
567
568 static int skel_sys_acl_set_qualifier(vfs_handle_struct *handle,  SMB_ACL_ENTRY_T entry, void *qual)
569 {
570         errno = ENOSYS;
571         return -1;
572 }
573
574 static int skel_sys_acl_set_permset(vfs_handle_struct *handle,  SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset)
575 {
576         errno = ENOSYS;
577         return -1;
578 }
579
580 static int skel_sys_acl_valid(vfs_handle_struct *handle,  SMB_ACL_T theacl )
581 {
582         errno = ENOSYS;
583         return -1;
584 }
585
586 static int skel_sys_acl_set_file(vfs_handle_struct *handle,  const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
587 {
588         errno = ENOSYS;
589         return -1;
590 }
591
592 static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
593 {
594         errno = ENOSYS;
595         return -1;
596 }
597
598 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,  const char *path)
599 {
600         errno = ENOSYS;
601         return -1;
602 }
603
604 static int skel_sys_acl_get_perm(vfs_handle_struct *handle,  SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
605 {
606         errno = ENOSYS;
607         return -1;
608 }
609
610 static int skel_sys_acl_free_text(vfs_handle_struct *handle,  char *text)
611 {
612         errno = ENOSYS;
613         return -1;
614 }
615
616 static int skel_sys_acl_free_acl(vfs_handle_struct *handle,  SMB_ACL_T posix_acl)
617 {
618         errno = ENOSYS;
619         return -1;
620 }
621
622 static int skel_sys_acl_free_qualifier(vfs_handle_struct *handle,  void *qualifier, SMB_ACL_TAG_T tagtype)
623 {
624         errno = ENOSYS;
625         return -1;
626 }
627
628 static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t size)
629 {
630         errno = ENOSYS;
631         return -1;
632 }
633
634 static ssize_t skel_lgetxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t
635 size)
636 {
637         errno = ENOSYS;
638         return -1;
639 }
640
641 static ssize_t skel_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size)
642 {
643         errno = ENOSYS;
644         return -1;
645 }
646
647 static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
648 {
649         errno = ENOSYS;
650         return -1;
651 }
652
653 static ssize_t skel_llistxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
654 {
655         errno = ENOSYS;
656         return -1;
657 }
658
659 static ssize_t skel_flistxattr(vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
660 {
661         errno = ENOSYS;
662         return -1;
663 }
664
665 static int skel_removexattr(vfs_handle_struct *handle, const char *path, const char *name)
666 {
667         errno = ENOSYS;
668         return -1;
669 }
670
671 static int skel_lremovexattr(vfs_handle_struct *handle, const char *path, const char *name)
672 {
673         errno = ENOSYS;
674         return -1;
675 }
676
677 static int skel_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
678 {
679         errno = ENOSYS;
680         return -1;
681         return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
682 }
683
684 static int skel_setxattr(vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
685 {
686         errno = ENOSYS;
687         return -1;
688 }
689
690 static int skel_lsetxattr(vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
691 {
692         errno = ENOSYS;
693         return -1;
694 }
695
696 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags)
697 {
698         errno = ENOSYS;
699         return -1;
700 }
701
702 static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
703 {
704         errno = ENOSYS;
705         return -1;
706 }
707
708 static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
709 {
710         errno = ENOSYS;
711         return -1;
712 }
713
714 static ssize_t skel_aio_return_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
715 {
716         errno = ENOSYS;
717         return -1;
718 }
719
720 static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
721 {
722         errno = ENOSYS;
723         return -1;
724 }
725
726 static int skel_aio_error_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
727 {
728         errno = ENOSYS;
729         return -1;
730 }
731
732 static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
733 {
734         errno = ENOSYS;
735         return -1;
736 }
737
738 static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
739 {
740         errno = ENOSYS;
741         return -1;
742 }
743
744 static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
745 {
746         errno = ENOSYS;
747         return false;
748 }
749
750 static bool skel_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf)
751 {
752         errno = ENOSYS;
753         return false;
754 }
755
756 static int skel_set_offline(struct vfs_handle_struct *handle, const char *path)
757 {
758         errno = ENOSYS;
759         return -1;
760 }
761
762 /* VFS operations structure */
763
764 struct vfs_fn_pointers skel_transparent_fns = {
765         /* Disk operations */
766
767         .connect_fn = skel_connect,
768         .disconnect = skel_disconnect,
769         .disk_free = skel_disk_free,
770         .get_quota = skel_get_quota,
771         .set_quota = skel_set_quota,
772         .get_shadow_copy_data = skel_get_shadow_copy_data,
773         .statvfs = skel_statvfs,
774         .fs_capabilities = skel_fs_capabilities,
775
776         /* Directory operations */
777
778         .opendir = skel_opendir,
779         .readdir = skel_readdir,
780         .seekdir = skel_seekdir,
781         .telldir = skel_telldir,
782         .rewind_dir = skel_rewind_dir,
783         .mkdir = skel_mkdir,
784         .rmdir = skel_rmdir,
785         .closedir = skel_closedir,
786         .init_search_op = skel_init_search_op,
787
788         /* File operations */
789
790         .open = skel_open,
791         .create_file = skel_create_file,
792         .close_fn = skel_close_fn,
793         .vfs_read = skel_vfs_read,
794         .pread = skel_pread,
795         .write = skel_write,
796         .pwrite = skel_pwrite,
797         .lseek = skel_lseek,
798         .sendfile = skel_sendfile,
799         .recvfile = skel_recvfile,
800         .rename = skel_rename,
801         .fsync = skel_fsync,
802         .stat = skel_stat,
803         .fstat = skel_fstat,
804         .lstat = skel_lstat,
805         .get_alloc_size = skel_get_alloc_size,
806         .unlink = skel_unlink,
807         .chmod = skel_chmod,
808         .fchmod = skel_fchmod,
809         .chown = skel_chown,
810         .fchown = skel_fchown,
811         .lchown = skel_lchown,
812         .chdir = skel_chdir,
813         .getwd = skel_getwd,
814         .ntimes = skel_ntimes,
815         .ftruncate = skel_ftruncate,
816         .lock = skel_lock,
817         .kernel_flock = skel_kernel_flock,
818         .linux_setlease = skel_linux_setlease,
819         .getlock = skel_getlock,
820         .symlink = skel_symlink,
821         .vfs_readlink = skel_vfs_readlink,
822         .link = skel_link,
823         .mknod = skel_mknod,
824         .realpath = skel_realpath,
825         .notify_watch = skel_notify_watch,
826         .chflags = skel_chflags,
827         .file_id_create = skel_file_id_create,
828
829         .streaminfo = skel_streaminfo,
830         .get_real_filename = skel_get_real_filename,
831         .connectpath = skel_connectpath,
832         .brl_lock_windows = skel_brl_lock_windows,
833         .brl_unlock_windows = skel_brl_unlock_windows,
834         .brl_cancel_windows = skel_brl_cancel_windows,
835         .strict_lock = skel_strict_lock,
836         .strict_unlock = skel_strict_unlock,
837         .translate_name = skel_translate_name,
838
839         /* NT ACL operations. */
840
841         .fget_nt_acl = skel_fget_nt_acl,
842         .get_nt_acl = skel_get_nt_acl,
843         .fset_nt_acl = skel_fset_nt_acl,
844
845         /* POSIX ACL operations. */
846
847         .chmod_acl = skel_chmod_acl,
848         .fchmod_acl = skel_fchmod_acl,
849
850         .sys_acl_get_entry = skel_sys_acl_get_entry,
851         .sys_acl_get_tag_type = skel_sys_acl_get_tag_type,
852         .sys_acl_get_permset = skel_sys_acl_get_permset,
853         .sys_acl_get_qualifier = skel_sys_acl_get_qualifier,
854         .sys_acl_get_file = skel_sys_acl_get_file,
855         .sys_acl_get_fd = skel_sys_acl_get_fd,
856         .sys_acl_clear_perms = skel_sys_acl_clear_perms,
857         .sys_acl_add_perm = skel_sys_acl_add_perm,
858         .sys_acl_to_text = skel_sys_acl_to_text,
859         .sys_acl_init = skel_sys_acl_init,
860         .sys_acl_create_entry = skel_sys_acl_create_entry,
861         .sys_acl_set_tag_type = skel_sys_acl_set_tag_type,
862         .sys_acl_set_qualifier = skel_sys_acl_set_qualifier,
863         .sys_acl_set_permset = skel_sys_acl_set_permset,
864         .sys_acl_valid = skel_sys_acl_valid,
865         .sys_acl_set_file = skel_sys_acl_set_file,
866         .sys_acl_set_fd = skel_sys_acl_set_fd,
867         .sys_acl_delete_def_file = skel_sys_acl_delete_def_file,
868         .sys_acl_get_perm = skel_sys_acl_get_perm,
869         .sys_acl_free_text = skel_sys_acl_free_text,
870         .sys_acl_free_acl = skel_sys_acl_free_acl,
871         .sys_acl_free_qualifier = skel_sys_acl_free_qualifier,
872
873         /* EA operations. */
874         .getxattr = skel_getxattr,
875         .lgetxattr = skel_lgetxattr,
876         .fgetxattr = skel_fgetxattr,
877         .listxattr = skel_listxattr,
878         .llistxattr = skel_llistxattr,
879         .flistxattr = skel_flistxattr,
880         .removexattr = skel_removexattr,
881         .lremovexattr = skel_lremovexattr,
882         .fremovexattr = skel_fremovexattr,
883         .setxattr = skel_setxattr,
884         .lsetxattr = skel_lsetxattr,
885         .fsetxattr = skel_fsetxattr,
886
887         /* aio operations */
888         .aio_read = skel_aio_read,
889         .aio_write = skel_aio_write,
890         .aio_return_fn = skel_aio_return_fn,
891         .aio_cancel = skel_aio_cancel,
892         .aio_error_fn = skel_aio_error_fn,
893         .aio_fsync = skel_aio_fsync,
894         .aio_suspend = skel_aio_suspend,
895         .aio_force = skel_aio_force,
896
897         /* offline operations */
898         .is_offline = skel_is_offline,
899         .set_offline = skel_set_offline
900 };
901
902 NTSTATUS vfs_skel_transparent_init(void)
903 {
904         return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_transparent", &skel_transparent_fns);
905 }