diff options
author | Sage Weil <sage@inktank.com> | 2013-08-02 15:17:02 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-02 15:19:13 -0700 |
commit | f3f25f68aff152c3d25ba007fe416247dd7edbd8 (patch) | |
tree | 9a193e32ff39a981a22878e34fcb18836ce0763f | |
parent | dfba712b85887bc2f96eed4c169b9bb7ac9fdf21 (diff) | |
download | ceph-f3f25f68aff152c3d25ba007fe416247dd7edbd8.tar.gz |
mon: drop old _allowed_command()
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/mon/Monitor.cc | 41 | ||||
-rw-r--r-- | src/mon/Monitor.h | 1 |
2 files changed, 0 insertions, 42 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index e227bf823ab..33b959f2727 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1535,47 +1535,6 @@ void Monitor::finish_election() } -bool Monitor::_allowed_command(MonSession *s, map<string, cmd_vartype>& cmd) -{ - bool retval = false; - - if (s->caps.is_allow_all()) { - dout(10) << __func__ << " allow_all" << dendl; - return true; - } - - string prefix; - cmd_getval(g_ceph_context, cmd, "prefix", prefix); - - map<string,string> strmap; - for (map<string, cmd_vartype>::const_iterator p = cmd.begin(); - p != cmd.end(); ++p) { - if (p->first == "prefix") - continue; - if (p->first == "caps") { - vector<string> cv; - if (cmd_getval(g_ceph_context, cmd, "caps", cv) && - cv.size() % 2 == 0) { - for (unsigned i = 0; i < cv.size(); i += 2) { - string k = string("caps_") + cv[i]; - strmap[k] = cv[i + 1]; - } - continue; - } - } - strmap[p->first] = cmd_vartype_stringify(p->second); - } - - dout(20) << __func__ << " strmap " << strmap << dendl; - if (s->caps.is_capable(g_ceph_context, s->inst.name, - "", prefix, strmap, false, false, true)) { - retval = true; - } - - dout(10) << __func__ << " = " << retval << dendl; - return retval; -} - void Monitor::sync_force(Formatter *f, ostream& ss) { bool free_formatter = false; diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index c76b8a47d4f..e39ffc20378 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -583,7 +583,6 @@ public: void handle_get_version(MMonGetVersion *m); void handle_subscribe(MMonSubscribe *m); void handle_mon_get_map(MMonGetMap *m); - bool _allowed_command(MonSession *s, map<std::string, cmd_vartype>& cmd); bool _allowed_command(MonSession *s, string &module, string& prefix, map<string,cmd_vartype>& cmdmap); void _mon_status(Formatter *f, ostream& ss); |