summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2022-06-03 16:45:41 +0200
committerJeremy Allison <jra@samba.org>2022-08-06 02:39:11 +0000
commit7cd871567615cb54cbefd66dd6a39206191473cc (patch)
treed480b4e93051cc8343feb829aef908cba3bb60c9 /examples
parent8693a0416b9d8562878e68969d9564661189148b (diff)
downloadsamba-7cd871567615cb54cbefd66dd6a39206191473cc.tar.gz
vfs: Add struct vfs_open_how.resolve
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
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 61c343f5434..a72ba57e1a7 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -199,6 +199,11 @@ static int skel_openat(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const struct vfs_open_how *how)
{
+ if (how->resolve != 0) {
+ errno = ENOSYS;
+ return -1;
+ }
+
errno = ENOSYS;
return -1;
}