From: Dave Chen Date: Mon, 16 Jan 2017 07:11:02 +0000 (+0800) Subject: auth: Enhancement for the supported auth methods X-Git-Tag: v12.0.0~95^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=364a6f2e39a21ad67c2888e3be6c37e4c1b958ab;p=ceph-ci.git auth: Enhancement for the supported auth methods - 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 --- diff --git a/src/auth/AuthMethodList.cc b/src/auth/AuthMethodList.cc index 78b8858c078..9ac1520fad9 100644 --- a/src/auth/AuthMethodList.cc +++ b/src/auth/AuthMethodList.cc @@ -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); } }