]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: fix and improve MDSCapMatch::match_path()
authorXiubo Li <xiubli@redhat.com>
Wed, 8 Nov 2023 01:20:53 +0000 (09:20 +0800)
committerKotresh HR <khiremat@redhat.com>
Wed, 9 Oct 2024 08:01:40 +0000 (13:31 +0530)
commitb7495e2fe3583c07592c12a4d777314cb5cec1ad
tree45f2eff975d3f85db923a168fdf45c65f5f87fd9
parent395dde2c355e480278f620273f6e7de40dc1d9e6
mds: fix and improve MDSCapMatch::match_path()

Just in case the 'target_path' is tailed with '/' it may fail to
match the 'path', such as in case 'path=/foo/' and 'target_path=/foo'
it will fail.

Just try to remove the tailing '/' from 'target_path' and then
also we can simplify the code to make it more readable.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit cd706e469699c4b90ffd3802e64ce2c0543944d4)
src/mds/MDSAuthCaps.cc