From 364a6f2e39a21ad67c2888e3be6c37e4c1b958ab Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Mon, 16 Jan 2017 15:11:02 +0800 Subject: [PATCH] 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 --- src/auth/AuthMethodList.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/auth/AuthMethodList.cc b/src/auth/AuthMethodList.cc index 78b8858c0782..9ac1520fad96 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); } } -- 2.47.3