Signed-off-by: Sage Weil <sage@redhat.com>
#undef dout_prefix
#define dout_prefix *_dout << "AuthRegistry(" << this << ") "
+AuthRegistry::AuthRegistry(CephContext *cct)
+ : cct(cct)
+{
+ cct->_conf.add_observer(this);
+}
+
+AuthRegistry::~AuthRegistry()
+{
+ cct->_conf.remove_observer(this);
+ for (auto i : authorize_handlers) {
+ delete i.second;
+ }
+}
+
const char** AuthRegistry::get_tracked_conf_keys() const
{
static const char *keys[] = {
"auth_client_required",
"auth_cluster_required",
"auth_service_required",
+ "ms_mon_cluster_mode",
+ "ms_mon_service_mode",
+ "ms_mon_client_mode",
+ "ms_cluster_mode",
+ "ms_service_mode",
+ "ms_client_mode",
"keyring",
NULL
};
return ah;
}
-AuthRegistry::~AuthRegistry()
-{
- for (auto i : authorize_handlers) {
- delete i.second;
- }
-}
void _refresh_config();
public:
- AuthRegistry(CephContext *cct) : cct(cct) {
- }
+ AuthRegistry(CephContext *cct);
~AuthRegistry();
void refresh_config() {