]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: return unknown if no supported auth is found
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 28 Oct 2011 01:11:28 +0000 (18:11 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 28 Oct 2011 01:12:24 +0000 (18:12 -0700)
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 <josh.durgin@dreamhost.com>
src/auth/AuthSupported.cc

index ea577926564f8df3b89be3cc5179fa9cab7bbcf0..3524bcfb493221c0ed08623bdd58c3c73a48c86a 100644 (file)
@@ -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;
 }