]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
auth: Enhancement for the supported auth methods
authorDave Chen <wei.d.chen@intel.com>
Mon, 16 Jan 2017 07:11:02 +0000 (15:11 +0800)
committerDave Chen <wei.d.chen@intel.com>
Mon, 16 Jan 2017 07:11:02 +0000 (15:11 +0800)
- If no auth protocol defined, `cephx` is used by default, it's debatable if
  ceph should abort here or use `cephx` by default, but if `cephx` is used
  in this case it's better to give some warning message.
- ceph has CEPH_AUTH_UNKNOWN auth protocol defined, change to use this
  protocol if the auth method is unknown.

Signed-off-by: Dave Chen <wei.d.chen@intel.com>
src/auth/AuthMethodList.cc

index 78b8858c0782234c2f1645cc8916d2979647fc90..9ac1520fad96095d4e8705ab8abccc9152be4e95 100644 (file)
@@ -35,10 +35,12 @@ AuthMethodList::AuthMethodList(CephContext *cct, string str)
     } else if (iter->compare("none") == 0) {
       auth_supported.push_back(CEPH_AUTH_NONE);
     } else {
+      auth_supported.push_back(CEPH_AUTH_UNKNOWN);
       lderr(cct) << "WARNING: unknown auth protocol defined: " << *iter << dendl;
     }
   }
   if (auth_supported.empty()) {
+    lderr(cct) << "WARNING: no auth protocol defined, use 'cephx' by default" << dendl;
     auth_supported.push_back(CEPH_AUTH_CEPHX);
   }
 }