From: Yanhu Cao Date: Tue, 8 Aug 2017 10:55:54 +0000 (+0800) Subject: mds/MDSDaemon: add 'is_valid=false' when failed to parse caps X-Git-Tag: v12.2.0~20^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ea7b38ace18fb121000ec351013ccadad91881d1;p=ceph.git mds/MDSDaemon: add 'is_valid=false' when failed to parse caps Fixes: http://tracker.ceph.com/issues/20990 Signed-off-by: Yanhu Cao (cherry picked from commit 353a89728ca82112873cc85ccc59b6cf7a3f37da) --- diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index 883a4c3b9c68b..19be284834b12 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -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; } }