1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/examples/VFS
Volker Lendecke 5fc016f268 vfs: change openat propotype to match linux openat2
The Linux prototype for openat2 looks like this:

       long openat2(int dirfd, const char *pathname,
                   struct open_how *how, size_t size);

where "struct open_how" is defined in "linux/openat2.h". It is
designed to be extensible with further flags.

The "size" parameter is required because there is no type checking
between userland and kernelspace, so the way for Linux to find which
version of open_how is being passed in is looking at the size:
"open_how" is expected to only every grow with additional fields,
should a change be necessary in the future.

Samba does not have this problem, we can typecheck the struct and
pointers, we expect all VFS modules to be compiled against the current
vfs.h.

For now this adds no functionality, but it will make further patches
much smaller.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-08-06 01:43:50 +00:00
..
README examples/VFS: fix a typo in the README 2011-10-08 01:42:33 +02:00
shadow_copy_test.c lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *) 2017-04-22 01:17:00 +02:00
skel_opaque.c vfs: change openat propotype to match linux openat2 2022-08-06 01:43:50 +00:00
skel_transparent.c vfs: change openat propotype to match linux openat2 2022-08-06 01:43:50 +00:00
wscript_build s3-waf: make sure we build example vfs modules with --enable-developer. 2011-10-11 21:22:55 +02:00

README for Samba Virtual File System (VFS) Example
===================================================

This directory contains skeleton VFS modules.  When used,
this module simply passes all requests back to the disk functions
(i.e it operates as a passthrough filter).  It should be
useful as a starting point for developing new VFS
modules. 

Please look at skel_opaque.c when you want your module to provide
final functions, like a database filesystem.

Please look at skel_transparent.c when you want your module to provide
passthrough functions, like audit modules. 

Please read the VFS chapter in the HOWTO collection for general help 
on the usage of VFS modules.

Further documentation on writing VFS modules for Samba can be found in
Samba Developers Guide.