]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: fix authorizer in the 'none' protocol case
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 3 Nov 2009 20:23:49 +0000 (12:23 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 3 Nov 2009 20:23:49 +0000 (12:23 -0800)
src/auth/none/AuthNoneClientHandler.h
src/auth/none/AuthNoneProtocol.h
src/mds/MDS.cc

index a191a4cd8a997106a3406264298087a02a1772ec..f45746a7b404442716fd93739859578900ee3113 100644 (file)
@@ -32,7 +32,12 @@ public:
   
   void tick() {}
 
-  AuthAuthorizer *build_authorizer(uint32_t service_id) { return new AuthNoneAuthorizer(); }
+  AuthAuthorizer *build_authorizer(uint32_t service_id) {
+    AuthNoneAuthorizer *auth = new AuthNoneAuthorizer();
+    if (auth)
+      auth->build_authorizer();
+    return auth;
+  }
 
   void validate_tickets() { }
   bool need_tickets() { return false; }
index 657813ec6a3b7fc069772deb65fb2ea955670dd9..131a954f9615185fc84380e9bf9b962d24b5f78b 100644 (file)
@@ -20,7 +20,7 @@
 struct AuthNoneAuthorizer : public AuthAuthorizer {
   AuthNoneAuthorizer() : AuthAuthorizer(CEPH_AUTH_NONE) { }
   bool build_authorizer() {
-    ::encode(g_conf.entity_name, bl);
+    ::encode(*g_conf.entity_name, bl);
     return 0;
   }
   bool verify_reply(bufferlist::iterator& reply) { return true; }
index 8f9829472358751e440b5b57835e75232654456b..907c7a72b96ff5d23ce3ddd87fc2c4a0d6ef0325 100644 (file)
@@ -1159,7 +1159,7 @@ bool MDS::ms_dispatch(Message *m)
 
 bool MDS::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new)
 {
-  dout(0) << "OSD::ms_get_authorizer type=" << dest_type << dendl;
+  dout(0) << "MDS::ms_get_authorizer type=" << dest_type << dendl;
 
   /* monitor authorization is being handled on different layer */
   if (dest_type == CEPH_ENTITY_TYPE_MON)