From 0e1137633e4ba6f9bbe8f819808f51a3d2feaced Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 26 Oct 2009 13:31:00 -0700 Subject: [PATCH] auth: don't enforce caps on internal mon messages --- src/mon/Monitor.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 9faefdb59fe44..50a99a88a8877 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -510,14 +510,9 @@ bool Monitor::ms_dispatch(Message *m) } } - int c = s->caps.get_caps(PAXOS_MONMAP); - if ((c & (MON_CAP_RW)) == (MON_CAP_RW)) { - dout(0) << "has rw caps" << dendl; - } #define ALLOW_CAPS(service_id, allow_caps) \ do { \ - int c = s->caps.get_caps(service_id); \ - if ((c & (allow_caps)) != (allow_caps)) { \ + if (s && ((int)s->caps.get_caps(service_id) & (allow_caps)) != (allow_caps)) { \ dout(0) << "filtered out request due to caps " \ << " allowing=" << #allow_caps << " message=" << *m << dendl; \ delete m; \ -- 2.39.5