]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds/Server: disallow clients that have root_squash
authorRamana Raja <rraja@redhat.com>
Tue, 15 Nov 2022 19:00:24 +0000 (14:00 -0500)
committerXiubo Li <xiubli@redhat.com>
Wed, 27 Mar 2024 00:42:41 +0000 (08:42 +0800)
commitf8ddb3f69c80c17703d952238c568eae82ae2362
treeb0d87a24da7c78e25749bcb9c7d0a1fc9c1b009a
parentb72508438e1fb799c010c86e3390c626509f0dc5
mds/Server: disallow clients that have root_squash

... MDS auth caps but don't have CEPHFS_FEATURE_MDS_AUTH_CAPS_CHECK
feature bit (i.e., can't check the auth caps sent back to it by the
MDS) from establishing a session. Do this in
Server::handle_client_session(), and Server::handle_client_reconnect(),
where old clients try to reconnect to MDS servers after an upgrade.

If the client doesn't have the ability to authorize session access
based on the MDS auth caps send back to it by the MDS, then the
client may buffer changes locally during open and setattr operations
when it's not supposed to, e.g., when enforcing root_squash MDS auth
caps.

Fixes: https://tracker.ceph.com/issues/56067
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit e64931b6a80d0f3e365ed0fe305b73562cbca502)
src/mds/MDSAuthCaps.h
src/mds/Server.cc