smbd: Add extra VFS hooks to get the posix ACL as a blob
[kamenim/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 struct tevent_req *skel_fsync_send(struct vfs_handle_struct *handle,
267                                           TALLOC_CTX *mem_ctx,
268                                           struct tevent_context *ev,
269                                           struct files_struct *fsp)
270 {
271         return NULL;
272 }
273
274 static int skel_fsync_recv(struct tevent_req *req, int *err)
275 {
276         *err = ENOSYS;
277         return -1;
278 }
279
280 static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
281 {
282         errno = ENOSYS;
283         return -1;
284 }
285
286 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf)
287 {
288         errno = ENOSYS;
289         return -1;
290 }
291
292 static int skel_lstat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
293 {
294         errno = ENOSYS;
295         return -1;
296 }
297
298 static uint64_t skel_get_alloc_size(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_STAT *sbuf)
299 {
300         errno = ENOSYS;
301         return -1;
302 }
303
304 static int skel_unlink(vfs_handle_struct *handle,
305                        const struct smb_filename *smb_fname)
306 {
307         errno = ENOSYS;
308         return -1;
309 }
310
311 static int skel_chmod(vfs_handle_struct *handle,  const char *path, mode_t mode)
312 {
313         errno = ENOSYS;
314         return -1;
315 }
316
317 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
318 {
319         errno = ENOSYS;
320         return -1;
321 }
322
323 static int skel_chown(vfs_handle_struct *handle,  const char *path, uid_t uid, gid_t gid)
324 {
325         errno = ENOSYS;
326         return -1;
327 }
328
329 static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp, uid_t uid, gid_t gid)
330 {
331         errno = ENOSYS;
332         return -1;
333 }
334
335 static int skel_lchown(vfs_handle_struct *handle,  const char *path, uid_t uid, gid_t gid)
336 {
337         errno = ENOSYS;
338         return -1;
339 }
340
341 static int skel_chdir(vfs_handle_struct *handle,  const char *path)
342 {
343         errno = ENOSYS;
344         return -1;
345 }
346
347 static char *skel_getwd(vfs_handle_struct *handle)
348 {
349         errno = ENOSYS;
350         return NULL;
351 }
352
353 static int skel_ntimes(vfs_handle_struct *handle,
354                        const struct smb_filename *smb_fname,
355                        struct smb_file_time *ft)
356 {
357         errno = ENOSYS;
358         return -1;
359 }
360
361 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, off_t offset)
362 {
363         errno = ENOSYS;
364         return -1;
365 }
366
367 static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
368                         enum vfs_fallocate_mode mode,
369                         off_t offset, off_t len)
370 {
371         errno = ENOSYS;
372         return -1;
373 }
374
375 static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, off_t offset, off_t count, int type)
376 {
377         errno = ENOSYS;
378         return false;
379 }
380
381 static int skel_kernel_flock(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32 share_mode, uint32 access_mask)
382 {
383         errno = ENOSYS;
384         return -1;
385 }
386
387 static int skel_linux_setlease(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype)
388 {
389         errno = ENOSYS;
390         return -1;
391 }
392
393 static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp, off_t *poffset, off_t *pcount, int *ptype, pid_t *ppid)
394 {
395         errno = ENOSYS;
396         return false;
397 }
398
399 static int skel_symlink(vfs_handle_struct *handle,  const char *oldpath, const char *newpath)
400 {
401         errno = ENOSYS;
402         return -1;
403 }
404
405 static int skel_vfs_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz)
406 {
407         errno = ENOSYS;
408         return -1;
409 }
410
411 static int skel_link(vfs_handle_struct *handle,  const char *oldpath, const char *newpath)
412 {
413         errno = ENOSYS;
414         return -1;
415 }
416
417 static int skel_mknod(vfs_handle_struct *handle,  const char *path, mode_t mode, SMB_DEV_T dev)
418 {
419         errno = ENOSYS;
420         return -1;
421 }
422
423 static char *skel_realpath(vfs_handle_struct *handle,  const char *path)
424 {
425         errno = ENOSYS;
426         return NULL;
427 }
428
429 static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle,
430             struct sys_notify_context *ctx,
431             const char *path,
432             uint32_t *filter,
433             uint32_t *subdir_filter,
434             void (*callback)(struct sys_notify_context *ctx, void *private_data, struct notify_event *ev),
435             void *private_data, void *handle_p)
436 {
437         return NT_STATUS_NOT_IMPLEMENTED;
438 }
439
440 static int skel_chflags(vfs_handle_struct *handle,  const char *path, uint flags)
441 {
442         errno = ENOSYS;
443         return -1;
444 }
445
446 static struct file_id skel_file_id_create(vfs_handle_struct *handle,
447                                           const SMB_STRUCT_STAT *sbuf)
448 {
449         struct file_id id;
450         ZERO_STRUCT(id);
451         errno = ENOSYS;
452         return id;
453 }
454
455 static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
456                                 struct files_struct *fsp,
457                                 const char *fname,
458                                 TALLOC_CTX *mem_ctx,
459                                 unsigned int *num_streams,
460                                 struct stream_struct **streams)
461 {
462         return NT_STATUS_NOT_IMPLEMENTED;
463 }
464
465 static int skel_get_real_filename(struct vfs_handle_struct *handle,
466                                 const char *path,
467                                 const char *name,
468                                 TALLOC_CTX *mem_ctx,
469                                 char **found_name)
470 {
471         errno = ENOSYS;
472         return -1;
473 }
474
475 static const char *skel_connectpath(struct vfs_handle_struct *handle,
476                                 const char *filename)
477 {
478         errno = ENOSYS;
479         return NULL;
480 }
481
482 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
483                                 struct byte_range_lock *br_lck,
484                                 struct lock_struct *plock,
485                                 bool blocking_lock,
486                                 struct blocking_lock_record *blr)
487 {
488         return NT_STATUS_NOT_IMPLEMENTED;
489 }
490
491 static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
492                                 struct messaging_context *msg_ctx,
493                                 struct byte_range_lock *br_lck,
494                                 const struct lock_struct *plock)
495 {
496         errno = ENOSYS;
497         return false;
498 }
499
500 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
501                                 struct byte_range_lock *br_lck,
502                                 struct lock_struct *plock,
503                                 struct blocking_lock_record *blr)
504 {
505         errno = ENOSYS;
506         return false;
507 }
508
509 static bool skel_strict_lock(struct vfs_handle_struct *handle,
510                                 struct files_struct *fsp,
511                                 struct lock_struct *plock)
512 {
513         errno = ENOSYS;
514         return false;
515 }
516
517 static void skel_strict_unlock(struct vfs_handle_struct *handle,
518                                 struct files_struct *fsp,
519                                 struct lock_struct *plock)
520 {
521         ;
522 }
523
524 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
525                                 const char *mapped_name,
526                                 enum vfs_translate_direction direction,
527                                 TALLOC_CTX *mem_ctx,
528                                 char **pmapped_name)
529 {
530         return NT_STATUS_NOT_IMPLEMENTED;
531 }
532
533 static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
534                         struct files_struct *fsp,
535                         TALLOC_CTX *ctx,
536                         uint32_t function,
537                         uint16_t req_flags,  /* Needed for UNICODE ... */
538                         const uint8_t *_in_data,
539                         uint32_t in_len,
540                         uint8_t **_out_data,
541                         uint32_t max_out_len,
542                         uint32_t *out_len)
543 {
544         return NT_STATUS_NOT_IMPLEMENTED;
545 }
546
547 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
548         uint32 security_info, struct security_descriptor **ppdesc)
549 {
550         return NT_STATUS_NOT_IMPLEMENTED;
551 }
552
553 static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
554         const char *name, uint32 security_info, struct security_descriptor **ppdesc)
555 {
556         return NT_STATUS_NOT_IMPLEMENTED;
557 }
558
559 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
560         uint32 security_info_sent, const struct security_descriptor *psd)
561 {
562         return NT_STATUS_NOT_IMPLEMENTED;
563 }
564
565 static int skel_chmod_acl(vfs_handle_struct *handle,  const char *name, mode_t mode)
566 {
567         errno = ENOSYS;
568         return -1;
569 }
570
571 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
572 {
573         errno = ENOSYS;
574         return -1;
575 }
576
577 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,  const char *path_p, SMB_ACL_TYPE_T type)
578 {
579         errno = ENOSYS;
580         return (SMB_ACL_T)NULL;
581 }
582
583 static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp)
584 {
585         errno = ENOSYS;
586         return (SMB_ACL_T)NULL;
587 }
588
589 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,  const char *path_p, SMB_ACL_TYPE_T type, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
590 {
591         errno = ENOSYS;
592         return -1;
593 }
594
595 static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle, files_struct *fsp, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
596 {
597         errno = ENOSYS;
598         return -1;
599 }
600
601 static int skel_sys_acl_set_file(vfs_handle_struct *handle,  const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
602 {
603         errno = ENOSYS;
604         return -1;
605 }
606
607 static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_T theacl)
608 {
609         errno = ENOSYS;
610         return -1;
611 }
612
613 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,  const char *path)
614 {
615         errno = ENOSYS;
616         return -1;
617 }
618
619 static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path, const char *name, void *value, size_t size)
620 {
621         errno = ENOSYS;
622         return -1;
623 }
624
625 static ssize_t skel_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size)
626 {
627         errno = ENOSYS;
628         return -1;
629 }
630
631 static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path, char *list, size_t size)
632 {
633         errno = ENOSYS;
634         return -1;
635 }
636
637 static ssize_t skel_flistxattr(vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
638 {
639         errno = ENOSYS;
640         return -1;
641 }
642
643 static int skel_removexattr(vfs_handle_struct *handle, const char *path, const char *name)
644 {
645         errno = ENOSYS;
646         return -1;
647 }
648
649 static int skel_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
650 {
651         errno = ENOSYS;
652         return -1;
653         return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
654 }
655
656 static int skel_setxattr(vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
657 {
658         errno = ENOSYS;
659         return -1;
660 }
661
662 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags)
663 {
664         errno = ENOSYS;
665         return -1;
666 }
667
668 static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
669 {
670         errno = ENOSYS;
671         return false;
672 }
673
674 static bool skel_is_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname, SMB_STRUCT_STAT *sbuf)
675 {
676         errno = ENOSYS;
677         return false;
678 }
679
680 static int skel_set_offline(struct vfs_handle_struct *handle, const struct smb_filename *fname)
681 {
682         errno = ENOSYS;
683         return -1;
684 }
685
686 /* VFS operations structure */
687
688 struct vfs_fn_pointers skel_opaque_fns = {
689         /* Disk operations */
690
691         .connect_fn = skel_connect,
692         .disconnect_fn = skel_disconnect,
693         .disk_free_fn = skel_disk_free,
694         .get_quota_fn = skel_get_quota,
695         .set_quota_fn = skel_set_quota,
696         .get_shadow_copy_data_fn = skel_get_shadow_copy_data,
697         .statvfs_fn = skel_statvfs,
698         .fs_capabilities_fn = skel_fs_capabilities,
699         .get_dfs_referrals_fn = skel_get_dfs_referrals,
700
701         /* Directory operations */
702
703         .opendir_fn = skel_opendir,
704         .fdopendir_fn = skel_fdopendir,
705         .readdir_fn = skel_readdir,
706         .seekdir_fn = skel_seekdir,
707         .telldir_fn = skel_telldir,
708         .rewind_dir_fn = skel_rewind_dir,
709         .mkdir_fn = skel_mkdir,
710         .rmdir_fn = skel_rmdir,
711         .closedir_fn = skel_closedir,
712         .init_search_op_fn = skel_init_search_op,
713
714         /* File operations */
715
716         .open_fn = skel_open,
717         .create_file_fn = skel_create_file,
718         .close_fn = skel_close_fn,
719         .read_fn = skel_vfs_read,
720         .pread_fn = skel_pread,
721         .pread_send_fn = skel_pread_send,
722         .pread_recv_fn = skel_pread_recv,
723         .write_fn = skel_write,
724         .pwrite_fn = skel_pwrite,
725         .pwrite_send_fn = skel_pwrite_send,
726         .pwrite_recv_fn = skel_pwrite_recv,
727         .lseek_fn = skel_lseek,
728         .sendfile_fn = skel_sendfile,
729         .recvfile_fn = skel_recvfile,
730         .rename_fn = skel_rename,
731         .fsync_fn = skel_fsync,
732         .fsync_send_fn = skel_fsync_send,
733         .fsync_recv_fn = skel_fsync_recv,
734         .stat_fn = skel_stat,
735         .fstat_fn = skel_fstat,
736         .lstat_fn = skel_lstat,
737         .get_alloc_size_fn = skel_get_alloc_size,
738         .unlink_fn = skel_unlink,
739         .chmod_fn = skel_chmod,
740         .fchmod_fn = skel_fchmod,
741         .chown_fn = skel_chown,
742         .fchown_fn = skel_fchown,
743         .lchown_fn = skel_lchown,
744         .chdir_fn = skel_chdir,
745         .getwd_fn = skel_getwd,
746         .ntimes_fn = skel_ntimes,
747         .ftruncate_fn = skel_ftruncate,
748         .fallocate_fn = skel_fallocate,
749         .lock_fn = skel_lock,
750         .kernel_flock_fn = skel_kernel_flock,
751         .linux_setlease_fn = skel_linux_setlease,
752         .getlock_fn = skel_getlock,
753         .symlink_fn = skel_symlink,
754         .readlink_fn = skel_vfs_readlink,
755         .link_fn = skel_link,
756         .mknod_fn = skel_mknod,
757         .realpath_fn = skel_realpath,
758         .notify_watch_fn = skel_notify_watch,
759         .chflags_fn = skel_chflags,
760         .file_id_create_fn = skel_file_id_create,
761
762         .streaminfo_fn = skel_streaminfo,
763         .get_real_filename_fn = skel_get_real_filename,
764         .connectpath_fn = skel_connectpath,
765         .brl_lock_windows_fn = skel_brl_lock_windows,
766         .brl_unlock_windows_fn = skel_brl_unlock_windows,
767         .brl_cancel_windows_fn = skel_brl_cancel_windows,
768         .strict_lock_fn = skel_strict_lock,
769         .strict_unlock_fn = skel_strict_unlock,
770         .translate_name_fn = skel_translate_name,
771         .fsctl_fn = skel_fsctl,
772
773         /* NT ACL operations. */
774
775         .fget_nt_acl_fn = skel_fget_nt_acl,
776         .get_nt_acl_fn = skel_get_nt_acl,
777         .fset_nt_acl_fn = skel_fset_nt_acl,
778
779         /* POSIX ACL operations. */
780
781         .chmod_acl_fn = skel_chmod_acl,
782         .fchmod_acl_fn = skel_fchmod_acl,
783
784         .sys_acl_get_file_fn = skel_sys_acl_get_file,
785         .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
786         .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
787         .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
788         .sys_acl_set_file_fn = skel_sys_acl_set_file,
789         .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
790         .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
791
792
793         /* EA operations. */
794         .getxattr_fn = skel_getxattr,
795         .fgetxattr_fn = skel_fgetxattr,
796         .listxattr_fn = skel_listxattr,
797         .flistxattr_fn = skel_flistxattr,
798         .removexattr_fn = skel_removexattr,
799         .fremovexattr_fn = skel_fremovexattr,
800         .setxattr_fn = skel_setxattr,
801         .fsetxattr_fn = skel_fsetxattr,
802
803         /* aio operations */
804         .aio_force_fn = skel_aio_force,
805
806         /* offline operations */
807         .is_offline_fn = skel_is_offline,
808         .set_offline_fn = skel_set_offline
809 };
810
811 NTSTATUS vfs_skel_opaque_init(void)
812 {
813         return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque", &skel_opaque_fns);
814 }