]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/Monitor: handle v1 call into handle_auth_request
authorSage Weil <sage@redhat.com>
Sun, 17 Mar 2019 18:57:26 +0000 (13:57 -0500)
committerSage Weil <sage@redhat.com>
Mon, 22 Apr 2019 12:07:37 +0000 (07:07 -0500)
A v1 connection should "succeed" at this point because the authentication
happens via MAuth messages.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/Monitor.cc

index 2bca52a0c8b9a2aae621d6750362e96b2fdfa76e..f56907c7cf0beb5dcefad95ea398dc3cb05f31cc 100644 (file)
@@ -6192,6 +6192,14 @@ int Monitor::handle_auth_request(
           << " method " << auth_method
           << " payload " << payload.length()
           << dendl;
+  if (!payload.length()) {
+    if (!con->is_msgr2()) {
+      // for v1 connections, we tolerate no authorizer, because authentication
+      // happens via MAuth messages.
+      return 1;
+    }
+    return -EACCES;
+  }
   if (!more) {
     auth_meta->auth_mode = payload[0];
   }