]> git.ipfire.org Git - thirdparty/samba.git/commit
vfs_ceph_snapshots: Always calculate absolute snapshot path
authorAnoop C S <anoopcs@samba.org>
Tue, 4 Mar 2025 10:45:05 +0000 (16:15 +0530)
committerJule Anger <janger@samba.org>
Thu, 8 May 2025 12:54:02 +0000 (12:54 +0000)
commit77e490b018a5c16f8b023539c4daa81bda16e11d
tree887d083efd8a2bdf3410e5d9f3dfb7e36d5ee2e4
parent501f32eab618c1bf63a663420092dba14095b4c7
vfs_ceph_snapshots: Always calculate absolute snapshot path

Use the same logic from shadow_copy2 module to always prepend the
connectpath to the relative snapshot path so as to return converted
path corresponding to the file's share root.

Please note that with the current working directory staying at the
connectpath level we are safe to prefix it to the smb_filename. In
other words it seems we never get past the connectpath internally
during normal file system operations via chdir(). Since all relative
paths are now based on dirfsp we could constitute absolute path by
prepending the connectpath to full_path_from_dirfsp_atname() output
ignoring the current working directory.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15819

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Wed Apr 30 11:32:59 UTC 2025 on atb-devel-224

(cherry picked from commit 95a2b50b1983a6ba810a96f50b27db7c992c02c0)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu May  8 12:54:02 UTC 2025 on atb-devel-224
source3/modules/vfs_ceph_snapshots.c