From: Josh Durgin Date: Fri, 28 Oct 2011 01:11:28 +0000 (-0700) Subject: auth: return unknown if no supported auth is found X-Git-Tag: v0.38~39 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=649921132b6bca1ff104c3fffe9a09bb26aba3fc;p=ceph.git auth: return unknown if no supported auth is found If NONE is supported, it will already be in the list of supported protocols, so there's no need to default to it here. This prevents clients that request the NONE protocol from authenticating when the server only accepts CEPHX. Instead, they get -ENOTSUP from the AuthMonitor. Signed-off-by: Josh Durgin --- diff --git a/src/auth/AuthSupported.cc b/src/auth/AuthSupported.cc index ea577926564f..3524bcfb4932 100644 --- a/src/auth/AuthSupported.cc +++ b/src/auth/AuthSupported.cc @@ -47,5 +47,5 @@ int AuthSupported::pick(const set<__u32>& supp) for (set<__u32>::const_reverse_iterator p = supp.rbegin(); p != supp.rend(); ++p) if (is_supported_auth(*p)) return *p; - return CEPH_AUTH_NONE; + return CEPH_AUTH_UNKNOWN; }