From: Sage Weil Date: Sat, 5 Oct 2019 15:50:01 +0000 (-0500) Subject: mon/MonCap: add 'crash' profile X-Git-Tag: v14.2.5~147^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=008f0f599e11200178fc0b5b9e2ff1e24e6deca0;p=ceph.git mon/MonCap: add 'crash' profile Signed-off-by: Sage Weil (cherry picked from commit 530f1190f6b7d8fe320f83e7134d2aaf9ac41c30) --- diff --git a/src/mon/MonCap.cc b/src/mon/MonCap.cc index 00b3016b3ba..8e838233740 100644 --- a/src/mon/MonCap.cc +++ b/src/mon/MonCap.cc @@ -177,6 +177,9 @@ void MonCapGrant::expand_profile(int daemon_type, const EntityName& name) const void MonCapGrant::expand_profile_mgr(const EntityName& name) const { + if (profile == "crash") { + profile_grants.push_back(MonCapGrant("crash post")); + } } void MonCapGrant::expand_profile_mon(const EntityName& name) const @@ -308,7 +311,10 @@ void MonCapGrant::expand_profile_mon(const EntityName& name) const "rbd/mirror/"); profile_grants.push_back(MonCapGrant("config-key get", "key", constraint)); } - + else if (profile == "crash") { + // TODO: we could limit this to getting the monmap and mgrmap... + profile_grants.push_back(MonCapGrant("mon", MON_CAP_R)); + } if (profile == "role-definer") { // grants ALL caps to the auth subsystem, read-only on the // monitor subsystem and nothing else.