]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDSDaemon: add 'is_valid=false' when failed to parse caps
authorYanhu Cao <gmayyyha@gmail.com>
Tue, 8 Aug 2017 10:55:54 +0000 (18:55 +0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 24 Aug 2017 16:55:55 +0000 (09:55 -0700)
Fixes: http://tracker.ceph.com/issues/20990
Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
(cherry picked from commit 353a89728ca82112873cc85ccc59b6cf7a3f37da)

src/mds/MDSDaemon.cc

index 883a4c3b9c68bda61d041dc1ed8c2273b2dbdedf..19be284834b122cdf8e26e0333bc94019fc0ab91 100644 (file)
@@ -1357,12 +1357,14 @@ bool MDSDaemon::ms_verify_authorizer(Connection *con, int peer_type,
                << " parsing '" << auth_cap_str << "'" << dendl;
        clog->warn() << name << " mds cap '" << auth_cap_str
                     << "' does not parse: " << errstr.str();
+        is_valid = false;
       }
     } catch (buffer::error& e) {
       // Assume legacy auth, defaults to:
       //  * permit all filesystem ops
       //  * permit no `tell` ops
       dout(1) << __func__ << ": cannot decode auth caps bl of length " << caps_info.caps.length() << dendl;
+      is_valid = false;
     }
   }