]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: Fix leading / issue with mds_check_access 58878/head
authorKotresh HR <khiremat@redhat.com>
Fri, 26 Jul 2024 14:48:04 +0000 (20:18 +0530)
committerKotresh HR <khiremat@redhat.com>
Tue, 30 Jul 2024 17:49:13 +0000 (23:19 +0530)
commit2e2adb2719c40a87d9fc556f5fa492ef6a2580dc
treeb3c8f32e4692714ba2eb2bdc441786204f0e18e2
parent983f893fb938b097682c10f3120460bfb2094bfd
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>
src/client/Client.cc