vfs_ceph_snapshots: fix root relative path handling
authorDavid Disseldorp <ddiss@samba.org>
Thu, 12 Dec 2019 21:14:50 +0000 (22:14 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 14 Jan 2020 08:30:24 +0000 (08:30 +0000)
commit67e429d86aed47f36a2bf8c05ae2e47e356bfa12
treeec212e8595916127001989903fc9abe18429878e
parent54a028bd32b41e1ba7e10b3f64877494a121d655
vfs_ceph_snapshots: fix root relative path handling

For file paths relative to root, ceph_snap_get_parent_path() may return
an empty parent dir string, in which case the CephFS snashot path should
be ".snap".

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14216

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 54293f92cd83efc3a5a78fc29a85643921da9d32)
source3/modules/vfs_ceph_snapshots.c