]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: require keyring even if cephx is optional 25125/head
authorrunsisi <luo.runbing@zte.com.cn>
Fri, 16 Nov 2018 06:56:39 +0000 (14:56 +0800)
committerrunsisi <luo.runbing@zte.com.cn>
Fri, 16 Nov 2018 06:56:39 +0000 (14:56 +0800)
Signed-off-by: runsisi <luo.runbing@zte.com.cn>
src/mon/Monitor.cc
src/mon/Monitor.h

index d63c5d5d0992501e678af1c3bbe9ed539ec82b40..01c1cc877a08dca49f815988126d60227e5292fa 100644 (file)
@@ -2890,13 +2890,8 @@ void Monitor::format_command_descriptions(const std::vector<MonCommand> &command
 
 bool Monitor::is_keyring_required()
 {
-  string auth_cluster_required = g_conf()->auth_supported.empty() ?
-    g_conf()->auth_cluster_required : g_conf()->auth_supported;
-  string auth_service_required = g_conf()->auth_supported.empty() ?
-    g_conf()->auth_service_required : g_conf()->auth_supported;
-
-  return auth_service_required == "cephx" ||
-    auth_cluster_required == "cephx";
+  return auth_cluster_required.is_supported_auth(CEPH_AUTH_CEPHX) ||
+    auth_service_required.is_supported_auth(CEPH_AUTH_CEPHX);
 }
 
 struct C_MgrProxyCommand : public Context {
index 065917139305bd04b593c1a5eaddb88a99658bd3..3c2685ae45f4774cf0d11187fe343eddcc828903 100644 (file)
@@ -976,7 +976,7 @@ public:
     leader_mon_commands = cmds;
   }
 
-  static bool is_keyring_required();
+  bool is_keyring_required();
 };
 
 #define CEPH_MON_FEATURE_INCOMPAT_BASE CompatSet::Feature (1, "initial feature set (~v.18)")