]> 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)
committerXiubo Li <xiubli@redhat.com>
Thu, 9 Nov 2023 06:40:54 +0000 (14:40 +0800)
commitcd706e469699c4b90ffd3802e64ce2c0543944d4
tree808e2b48166a275bf2c2d40016bcc93f892ddaf2
parentbd3e01926fc472cfddb0b6bb79b822595632b378
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>
src/mds/MDSAuthCaps.cc