summaryrefslogtreecommitdiff
path: root/examples/VFS
AgeCommit message (Collapse)AuthorFilesLines
2026-03-01vfs: Remove unused SMB_VFS_GETWD()Volker Lendecke2-15/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Mar 1 21:22:24 UTC 2026 on atb-devel-224
2026-02-15vfs: Add "fsp" to SMB_VFS_SET_QUOTAVolker Lendecke2-5/+11
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15vfs: Change SMB_VFS_GET_QUOTA to take a fsp instead of a nameVolker Lendecke2-9/+9
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15vfs: Remove SMB_VFS_STATVFSVolker Lendecke2-17/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15vfs: Add SMB_VFS_FSTATVFSVolker Lendecke2-0/+17
To replace SMB_VFS_STATVFS next Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15vfs: Change SMB_VFS_DISK_FREE to take a fspVolker Lendecke2-9/+9
The modules that change the pathname need a synthetic_pathref now for the SMB_VFS_NEXT_DISK_FREE() call. I think this is the right thing to do anyway, as this goes through all the path scrutiny and does not depend on direct multi-component paths anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-10examples: Fix trailing whitespaceVolker Lendecke3-17/+17
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-10vfs: Remove audit_file functionVolker Lendecke2-24/+0
Added in 2012 with 0dc3f423d25d3a, but I could not find any user of that call. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-10vfs: Remove connectpath functionVolker Lendecke2-19/+0
Nobody called this Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-10-21vfs: Add SMB_VFS_RENAME_STREAMVolker Lendecke2-0/+22
[MS-FSA] 2.1.5.15.12.1 Algorithm for Performing Stream Rename is simpler and diffent enough from renaming a file or directory that I believe a separate VFS operation is justified instead of tunneling it through the renameat call. For example it's only possible to rename streams within a file, so only one stream open fsp and a newname which is guaranteed to be a stream name is necessary. Add stub implementations to our streams modules, to be filled later. Signed-off-by: Volker Lendecke <vl@samba.org> vfs_streams_xattr: rename_streams Reviewed-by: Ralph Boehme <slow@samba.org>
2024-08-21s3:vfs: add vfs_rename_how to SMB_VFS_RENAMEAT()Stefan Metzmacher2-3/+6
This will support renameat2-like operations in future. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15693 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2023-10-25examples: Fix code spellingJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-23vfs: Remove "sbuf" from readdir_fn()Volker Lendecke2-7/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jun 23 18:29:40 UTC 2023 on atb-devel-224
2023-06-14vfs: Remove vfs telldir/seekdir functionsVolker Lendecke2-24/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 14 00:26:55 UTC 2023 on atb-devel-224
2022-09-17vfs: Add dirfsp to connectpath_fn()Volker Lendecke2-5/+9
So far we only call CONNECTPATH on full paths. In the future, we'll have a call that will not have converted a relative path to absolute just for efficiency reasons. To give shadow_copy2 the chance to still find the snapshot directory, pass the dirfsp down to it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-08-06vfs: Add struct vfs_open_how.resolveVolker Lendecke1-0/+5
This prepares the later introduction of VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS, which will be used to make use of RESOLVE_NO_SYMLINKS on linux with openat2(). Right now all terminal VFS objects reject any resolve bits with ENOSYS. So we only prepare the vfs layer for now without any real change. But this will make backports to 4.17 much easier. 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> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Aug 6 02:39:11 UTC 2022 on sn-devel-184
2022-08-06vfs: change openat propotype to match linux openat2Volker Lendecke2-5/+3
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-04-28Revert "vfs: remove dirfsp arg from SMB_VFS_CREATE_FILE()"Volker Lendecke2-0/+3
This reverts commit 322574834f1e71bc01f21be9059ca4d386517c84. Not strictly a revert anymore, but for future work we do need "dirfsp" in create_file_default() passed through the VFS. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2022-04-28vfs: Remove name-based SMB_VFS_GET_REAL_FILENAME()Volker Lendecke2-21/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2022-04-28vfs: Add SMB_VFS_GET_REAL_FILENAME_ATVolker Lendecke2-0/+21
In a patchset that I'm working on right now there's the need to call getrealfilename while the code does have a pathref fsp already around. Doing the name-based call including non_widelink_open is not necessary in this case. Start by adding the _at based call to the VFS. For now, fall back to the name-based call. glusterfs-fuse will in a future patch be converted to fgetxattr. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2022-03-10vfs: Convert get_real_filename() to NTSTATUSVolker Lendecke2-10/+11
This makes it possible to more easily handle STOPPED_ON_SYMLINK vs OBJECT_PATH_NOT_FOUND vs OBJECT_NAME_NOT_FOUND and so on. The next patch needs this to properly handle symlinks. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-03-10vfs: Add SMB_VFS_FSTATATVolker Lendecke2-0/+23
Useful if you want to stat/fstat/lstat relative to a directory without doing chdir first. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-10-08vfs: Add flags and xferlen args to SMB_VFS_OFFLOAD_READ_RECVRalph Boehme2-0/+10
We missed these values which follow from MS-FSCC 2.3.80 “FSCTL_OFFLOAD_READ Reply”: Flags (4 bytes): A 32-bit unsigned integer that indicates which flags were returned for this operation. Possible values for the flags follow. All unused bits are reserved for future use, SHOULD be set to 0, and MUST be ignored. OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_CURRENT_RANGE (0x00000001) => The data beyond the current range is logically equivalent to zero. TransferLength (8 bytes): A 64-bit unsigned integer that contains the amount, in bytes, of data that the Token logically represents. This value indicates a contiguous region of the file from the beginning of the requested offset in the FileOffset field in the FSCTL_OFFLOAD_READ_INPUT data element (section 2.3.79). This value can be smaller than the CopyLength field specified in the FSCTL_OFFLOAD_READ_INPUT data element, which indicates that less data was logically represented (logically read) with the Token than was requested. The value of this field MUST be greater than 0x0000000000000000 and MUST be aligned to a logical sector boundary on the volume. As we currently only implement COPY_CHUNK over the OFFLOAD VFS interface, the VFS COPY_CHUNK backend in vfs_default just sets both values to 0 and they are unused in the SMB frontend. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-09-21examples/VFS/skel_opaque: Rename kernel_flock to filesystem_sharemodeChristof Schmitt1-4/+5
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-09-21examples/VFS/skel_transparent: Rename kernel_flock to filesystem_sharemodeChristof Schmitt1-4/+5
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-09-21VFS: Rename kernel_flock to filesystem_sharemodeChristof Schmitt2-3/+6
With the removal of the call to flock LOCK_MAND, the only remaining use of this VFS path is to register sharemodes with specific file systems. Rename the VFS call to reflect that this is no longer related to flock. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-07-04vfs: RIP SMB_VFS_GETXATTR()Jeremy Allison2-21/+0
.--. .-, .-..-.__ .'(`.-` \_.-'-./` |\_( "\__ __.>\ '; _;---,._| / __/`'--) /.--. : |/' _.--.<| / | | _..-' `\ /' /` /_/ _/_/ >_.-``-. `Y /' _;---.`|/)))) '` .-''. \|: .' __, .-'"` .'--._ `-: \/: /' '.\ _|_ /.'`\ :; /' `- `-|-` -` | | | :.; : | .-'~^~`-. |: | .' _ _ `. |:. | | |_) | |_) | :. : | | | \ | | | : ; | | | : ; | | SMB_VFS | : ; | | GETXATTR | : ; | | | .jgs. : ; | | -."-/\\\/:::. `\."-._'."-"_\\-| |///."- " -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-". Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-06-29VFS: Remove SMB_VFS_CHFLAGS, not used anymoreNoel Power2-17/+0
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-06-29VFS: Add initial implemenataion for SMB_VFS_FCHFLAGSNoel Power2-0/+17
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-06-09s3: VFS: RIP SMB_VFS_SYS_ACL_BLOB_GET_FILE()Jeremy Allison2-22/+0
(\ _ /) ( \ O / ) (// \\) X / \ /___\ _____/ \\_____ | + || | || | SMB_VFS_SYS_ACL || | BLOB_GET_FILE() || | || | || | || | _ ___ _ || | | \ | | \ || | | | | | | || | |_/ | |_/ || | | \ | | || | | \ | | || | | \. _|_. | . || | || * * | * ** * ** |** ** \)),.,\(/.,(//,,..,,\||(,,.,\\,.((// Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-06-09s3: VFS: RIP SMB_VFS_SYS_ACL_GET_FILE()Jeremy Allison2-19/+0
(\ _ /) ( \ O / ) (// \\) X / \ /___\ _____/ \\_____ | + || | || | SMB_VFS_SYS_ || | ACL_GET_FILE() || | || | || | || | _ ___ _ || | | \ | | \ || | | | | | | || | |_/ | |_/ || | | \ | | || | | \ | | || | | \. _|_. | . || | || * * | * ** * ** |** ** \)),.,\(/.,(//,,..,,\||(,,.,\\,.((// Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-06-09vfs: RIP SMB_VFS_GET_NT_ACL_AT()Jeremy Allison2-27/+0
.--. .-, .-..-.__ .'(`.-` \_.-'-./` |\_( "\__ __.>\ '; _;---,._| / __/`'--) /.--. : |/' _.--.<| / | | _..-' `\ /' /` /_/ _/_/ >_.-``-. `Y /' _;---.`|/)))) '` .-''. \|: .' __, .-'"` .'--._ `-: \/: /' '.\ _|_ /.'`\ :; /' `- `-|-` -` | | | :.; : | .-'~^~`-. |: | .' _ _ `. |:. | | |_) | |_) | :. : | | | \ | | | : ; | | | : ; | | SMB_VFS | : ; | | GET_NT_ | : ; | | ACL_AT | .jgs. : ; | | -."-/\\\/:::. `\."-._'."-"_\\-| |///."- " -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-". Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-06-09VFS: SMB_VFS_SYS_ACL_GET_FD: Modify api to take additional type paramNoel Power2-3/+7
Modify all implementations (and the definitions) related to SMB_VFS_SYS_ACL_GET_FD to accept additional SMB_ACL_TYPE_T type param. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-06-02s3: VFS: Add SMB_VFS_PARENT_PATHNAME().Jeremy Allison2-0/+24
Not yet used. Default is NTSTATUS version of parent_smb_fname(). Now to replace all users of parent_smb_fname() with SMB_VFS_PARENT_PATHNAME() and then remove parent_smb_fname(). Needed due to snapdirseverywhere code in vfs_shadow_copy2. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-05-18vfs: RIP SMB_VFS_SYS_ACL_DELETE_DEF_FILE()Jeremy Allison2-15/+0
.--. .-, .-..-.__ .'(`.-` \_.-'-./` |\_( "\__ __.>\ '; _;---,._| / __/`'--) /.--. : |/' _.--.<| / | | _..-' `\ /' /` /_/ _/_/ >_.-``-. `Y /' _;---.`|/)))) '` .-''. \|: .' __, .-'"` .'--._ `-: \/: /' '.\ _|_ /.'`\ :; /' `- `-|-` -` | | | :.; : | .-'~^~`-. |: | .' _ _ `. |:. | | |_) | |_) | :. : | | | \ | | | : ; | | | : ; | | SMB_VFS | : ; | | SYS_ACL | : ; | |DELETE_DEF | .jgs. : ; | FILE | -."-/\\\/:::. `\."-._'."-"_\\-| |///."- " -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-". Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org>
2021-05-18s3: VFS: Add SMB_VFS_SYS_ACL_DELETE_DEF_FD(),Jeremy Allison2-0/+15
Not yet used. Eventually will replace SMB_VFS_SYS_ACL_DELETE_DEF_FILE(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
2021-05-14s3: VFS: Remove SMB_VFS_READDIR_ATTR(), no longer usedSamuel Cabrero2-18/+0
---------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_READDIR_ATTR | | | | | | 13 May | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\///\/|_)_______ Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-05-14VFS: Add SMB_VFS_FREADDIR_ATTR()Samuel Cabrero2-0/+18
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-05-11s3: VFS: Remove SMB_VFS_STREAMINFO(), no longer usedNoel Power2-27/+0
--------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_STREAMINFO | | | | | | 28 April | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\////|_)_______ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-05-11VFS: Add SMB_VFS_FSTREAMINFONoel Power2-0/+24
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-04-19s3: VFS: Remove SMB_VFS_NTIMES(), no longer usedSamuel Cabrero2-17/+0
--------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_NTIMES | | | | | | 13 April | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\////|_)_______ Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Samuel Cabrero <scabrero@samba.org> Autobuild-Date(master): Mon Apr 19 13:19:35 UTC 2021 on sn-devel-184
2021-04-19VFS: Add SMB_VFS_FNTIMESSamuel Cabrero2-0/+17
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11VFS: Remove SMB_VFS_CHMOD, no longer usedNoel Power2-17/+0
--------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_CHMOD | | | | | | 08 April | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\////|_)_______ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Sun Apr 11 23:25:31 UTC 2021 on sn-devel-184
2021-04-08VFS: Remove SMB_VFS_SET_DOS_ATTRIBUTE, no longer usedNoel Power2-18/+0
------------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_SET_DOS_ATTRIBUTE | | | | | | 3 March | | 2021 | | | | | *| * * * * * | * _________)/\\_//(\/(/\)/\//\/\////\\/|_)_______ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 8 18:38:40 UTC 2021 on sn-devel-184
2021-04-07VFS: Remove SMB_VFS_REMOVEXATTR, no longer usedJeremy Allison2-17/+0
--------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_REMOVEXATTR | | | | | | 22 March | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\////|_)_______ Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-03-11VFS: Remove SMB_VFS_SETXATTR, no longer usedNoel Power2-24/+0
--------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_SETXATTR | | | | | | 19 February | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\////|_)_______ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Signed-off-by: Noel Power <noel.power@suse.com>
2021-02-26VFS: Remove SMB_VFS_LISTXATTR, no longer usedNoel Power2-19/+0
--------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_LISTXATTR | | | | | | 10 February | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\////|_)_______ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-17vfs: RIP SMB_VFS_SYS_ACL_SET_FILE()Ralph Boehme2-20/+0
.--. .-, .-..-.__ .'(`.-` \_.-'-./` |\_( "\__ __.>\ '; _;---,._| / __/`'--) /.--. : |/' _.--.<| / | | _..-' `\ /' /` /_/ _/_/ >_.-``-. `Y /' _;---.`|/)))) '` .-''. \|: .' __, .-'"` .'--._ `-: \/: /' '.\ _|_ /.'`\ :; /' `- `-|-` -` | | | :.; : | .-'~^~`-. |: | .' _ _ `. |:. | | |_) | |_) | :. : | | | \ | | | : ; | | | : ; | | SMB_VFS | : ; | | SYS_ACL | : ; | | SET_FILE | .jgs. : ; | | -."-/\\\/:::. `\."-._'."-"_\\-| |///."- " -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-". Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-17vfs: add acl type arg to SMB_VFS_SYS_ACL_SET_FD()Ralph Boehme2-3/+7
No change in behaviour, the new arg is not yet used in any module. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-16vfs: SMB_VFS_GET_COMPRESSION() -> SMB_VFS_FGET_COMPRESSION()Ralph Boehme2-7/+5
Now that handle based fdos_mode() is used everywhere we can be sure that we're also always getting a handle in SMB_VFS_GET_COMPRESSION() so we can now safely remove the path parameter. :) Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>