]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: Fix leading / issue with mds_check_access 58982/head
authorKotresh HR <khiremat@redhat.com>
Fri, 26 Jul 2024 14:48:04 +0000 (20:18 +0530)
committerKotresh HR <khiremat@redhat.com>
Wed, 11 Sep 2024 09:16:03 +0000 (14:46 +0530)
commit9a0d72c4294b94dcc17a72e38eb573b702ac1b48
treed6c0c603d31af1076d25da4e45d2015cbc39b792
parent7c3f8cfdfda814dde5ea07d6fcfa50cae45d387d
client: Fix leading / issue with mds_check_access

The "Client::mds_check_access" expects the target_path without
leading '/' as it eventually calls the "MDSCapMatch::match_path"
which expects the target_path passed to be with out leading '/'
as well.

The single leading '/' was being removed. But absolute path
constructed did have leading '//', so removing all the leading
'/' was necessary.

This causes the clients not to be able to access a particular
path even though it has a rw permission on the specific path.

The patche fixes the leading '//' issue.

Fixes: https://tracker.ceph.com/issues/67212
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 2e2adb2719c40a87d9fc556f5fa492ef6a2580dc)
src/client/Client.cc