From: Kotresh HR Date: Thu, 1 Aug 2024 16:46:00 +0000 (+0530) Subject: client: Fix the multifs auth caps check X-Git-Tag: testing/wip-vshankar-testing-20250812.045652-debug^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b1d6bb95d3c805af37883ef481b96a1aa33cedf0;p=ceph-ci.git client: Fix the multifs auth caps check The fsname needs to be passed to validate the mds auth caps check. This patch fixes the same. Fixes: https://tracker.ceph.com/issues/72167 Signed-off-by: Kotresh HR --- diff --git a/src/client/Client.cc b/src/client/Client.cc index c57e282ca6b..df17fe9ccd1 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -6088,11 +6088,12 @@ int Client::mds_check_access(std::string& path, const UserPerm& perms, int mask) path = path.substr(1); } + std::string_view fs_name = mdsmap->get_fs_name(); for (auto& s: cap_auths) { - ldout(cct, 20) << __func__ << " auth match path " << s.match.path << " r: " << s.readable - << " w: " << s.writeable << dendl; + ldout(cct, 20) << __func__ << " auth match fsname " << s.match.fs_name << " auth match path " + << s.match.path << " r: " << s.readable << " w: " << s.writeable << dendl; ldout(cct, 20) << " match.uid " << s.match.uid << dendl; - if (s.match.match(path, perms.uid(), perms.gid(), &gid_list)) { + if (s.match.match(fs_name, path, perms.uid(), perms.gid(), &gid_list)) { ldout(cct, 20) << " is matched" << dendl; // always follow the last auth caps' permision root_squash_perms = true;