]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: check auth name before reclaiming session
authorYan, Zheng <zyan@redhat.com>
Wed, 15 Aug 2018 01:29:14 +0000 (09:29 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 26 Sep 2018 13:42:54 +0000 (21:42 +0800)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/Server.cc

index 9dbd5924235f0c388b3b05d1d56f31525277b752..205b8bda8b82fdd41d5cf45bf162b0b49aa51902 100644 (file)
@@ -346,6 +346,13 @@ void Server::reclaim_session(Session *session, const MClientReclaim::const_ref &
 
   Session* target = find_session_by_uuid(m->get_uuid());
   if (target) {
+    if (session->info.auth_name != target->info.auth_name) {
+      dout(10) << __func__ << " session auth_name " << session->info.auth_name
+              << " != target auth_name " << target->info.auth_name << dendl;
+      reply->set_result(-EPERM);
+      mds->send_message_client(reply, session);
+    }
+
     assert(!target->reclaiming_from);
     assert(!session->reclaiming_from);
     session->reclaiming_from = target;