]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: fix up ms_get_authorizer
authorSage Weil <sage@newdream.net>
Thu, 22 Oct 2009 21:27:35 +0000 (14:27 -0700)
committerSage Weil <sage@newdream.net>
Thu, 22 Oct 2009 21:27:35 +0000 (14:27 -0700)
Never return authorizer for monitors.

src/librados.cc
src/mds/MDS.cc
src/osd/OSD.cc

index cafe5af67cd0b3f0979454a6dabc4705c788b536..7d19b22bbf8a587f40535f224a848558b19ec221 100644 (file)
@@ -62,9 +62,10 @@ class RadosClient : public Dispatcher
 
   bool ms_get_authorizer(int dest_type, AuthAuthorizer& authorizer, bool force_new) {
     dout(0) << "RadosClient::ms_get_authorizer type=" << dest_type << dendl;
-    if (monclient.auth.build_authorizer(dest_type, authorizer) < 0)
-      return false;
-    return true;
+    /* monitor authorization is being handled on different layer */
+    if (dest_type == CEPH_ENTITY_TYPE_MON)
+      return true;
+    return monclient.auth.build_authorizer(dest_type, authorizer);
   }
   void ms_handle_connect(Connection *con);
   bool ms_handle_reset(Connection *con);
index 80f3dcd1082b0801c2188de9d74bfaaa568ce9fa..7ed508768a196db7676899ef4ee5248bc0077274 100644 (file)
@@ -1168,10 +1168,7 @@ bool MDS::ms_get_authorizer(int dest_type, AuthAuthorizer& authorizer, bool forc
       return false;
   }
 
-  if (monc->auth.build_authorizer(dest_type, authorizer) < 0)
-    return false;
-
-  return true;
+  return monc->auth.build_authorizer(dest_type, authorizer);
 }
 
 bool MDS::_dispatch(Message *m)
index 6aecc5454a57d5e543ad5b216867bc773f1292e6..c851cdab95c76b55b6e300cb9145011bdadc5413 100644 (file)
@@ -1511,10 +1511,7 @@ bool OSD::ms_get_authorizer(int dest_type, AuthAuthorizer& authorizer, bool forc
       return false;
   }
 
-  if (monc->auth.build_authorizer(dest_type, authorizer) < 0)
-    return false;
-
-  return true;
+  return monc->auth.build_authorizer(dest_type, authorizer);
 }
 
 bool OSD::ms_verify_authorizer(Connection *con, int peer_type,