From 7b1101410271f2a0031e54738325a33141017373 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Mon, 22 Mar 2010 16:35:08 -0700 Subject: [PATCH] mon: use check_privileges instead of macro for MSG_MON_ELECTION --- src/mon/Monitor.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 60282c28d0a62..693224d2aaf39 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -715,7 +715,12 @@ do { \ // elector messages case MSG_MON_ELECTION: - ALLOW_MESSAGES_FROM(CEPH_ENTITY_TYPE_MON); + //check privileges here for simplicity + if (s && + !s->caps.check_privileges(PAXOS_MONMAP, MON_CAP_X)) { + dout(0) << "MMonElection received from entity without enough caps!" + << s->caps << dendl; + } elector.dispatch(m); break; -- 2.39.5