summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-02 15:17:02 -0700
committerJoao Eduardo Luis <joao.luis@inktank.com>2013-08-06 13:59:33 -0700
commit94002c43deea7602588f8baff02b4cf367e750e8 (patch)
tree9a193e32ff39a981a22878e34fcb18836ce0763f
parent612444a887a441fb32cbfc966feaea281ed4b193 (diff)
downloadceph-94002c43deea7602588f8baff02b4cf367e750e8.tar.gz
mon: drop old _allowed_command()
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/mon/Monitor.cc41
-rw-r--r--src/mon/Monitor.h1
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);