mirror of
https://github.com/ceph/ceph
synced 2025-02-15 23:07:55 +00:00
mon: MSG_LOG uses an in-handler cap check instead of a macro
This commit is contained in:
parent
ccb5cff408
commit
45f8072b52
@ -229,6 +229,12 @@ void LogMonitor::committed()
|
||||
bool LogMonitor::preprocess_log(MLog *m)
|
||||
{
|
||||
dout(10) << "preprocess_log " << *m << " from " << m->get_orig_source() << dendl;
|
||||
|
||||
if (!m->caps->check_privileges(PAXOS_LOG, MON_CAP_X)) {
|
||||
dout(0) << "Received MLog from entity with insufficient privileges "
|
||||
<< m->caps << dendl;
|
||||
return true; //no reply expected
|
||||
}
|
||||
|
||||
int num_new = 0;
|
||||
for (deque<LogEntry>::iterator p = m->entries.begin();
|
||||
|
@ -663,7 +663,6 @@ do { \
|
||||
|
||||
// log
|
||||
case MSG_LOG:
|
||||
ALLOW_CAPS(PAXOS_LOG, MON_CAP_RW);
|
||||
fill_caps(m);
|
||||
paxos_service[PAXOS_LOG]->dispatch((PaxosServiceMessage*)m);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user