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