summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2022-09-14 20:18:33 -0700
committerJeremy Allison <jra@samba.org>2022-09-17 04:15:35 +0000
commite1ca4e28d89237c8910e77146824ecc3444ce272 (patch)
tree044fb91623cc5008c214667fb2ee6521d0288bec /examples
parent9ef2f7345f0d387567fca598cc7008af95598903 (diff)
downloadsamba-e1ca4e28d89237c8910e77146824ecc3444ce272.tar.gz
vfs: Add dirfsp to connectpath_fn()
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>
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c6
-rw-r--r--examples/VFS/skel_transparent.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index a72ba57e1a7..98b090728f2 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -665,8 +665,10 @@ static NTSTATUS skel_get_real_filename_at(struct vfs_handle_struct *handle,
return NT_STATUS_NOT_IMPLEMENTED;
}
-static const char *skel_connectpath(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname)
+static const char *skel_connectpath(
+ struct vfs_handle_struct *handle,
+ const struct files_struct *dirfsp,
+ const struct smb_filename *smb_fname)
{
errno = ENOSYS;
return NULL;
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 8fb8644ad09..b152f3596c5 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -886,10 +886,12 @@ static NTSTATUS skel_get_real_filename_at(struct vfs_handle_struct *handle,
handle, dirfsp, name, mem_ctx, found_name);
}
-static const char *skel_connectpath(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname)
+static const char *skel_connectpath(
+ struct vfs_handle_struct *handle,
+ const struct files_struct *dirfsp,
+ const struct smb_filename *smb_fname)
{
- return SMB_VFS_NEXT_CONNECTPATH(handle, smb_fname);
+ return SMB_VFS_NEXT_CONNECTPATH(handle, dirfsp, smb_fname);
}
static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,