]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: auth none encodes global_id at build_authorizer
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 10 Nov 2009 00:54:08 +0000 (16:54 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 10 Nov 2009 00:54:08 +0000 (16:54 -0800)
src/auth/none/AuthNoneClientHandler.h
src/auth/none/AuthNoneProtocol.h

index ecfac4b13e590687cdcdca18d5f297fbaef5af4f..83199b22a89ee0c809fcdaee9dc5689449010d9e 100644 (file)
@@ -34,8 +34,9 @@ public:
 
   AuthAuthorizer *build_authorizer(uint32_t service_id) {
     AuthNoneAuthorizer *auth = new AuthNoneAuthorizer();
-    if (auth)
-      auth->build_authorizer();
+    if (auth) {
+      auth->build_authorizer(global_id);
+    }
     return auth;
   }
 
index 9ec4fc7044e987c4da1f7d26d23632a0c2f31146..0f70a6efbd17bc072f7cb1dddf6174087e593999 100644 (file)
 #include "../Auth.h"
 
 struct AuthNoneAuthorizer : public AuthAuthorizer {
-  uint64_t global_id;
-
   AuthNoneAuthorizer() : AuthAuthorizer(CEPH_AUTH_NONE) { }
-  bool build_authorizer() {
+  bool build_authorizer(uint64_t global_id) {
     ::encode(*g_conf.entity_name, bl);
     ::encode(global_id, bl);
     return 0;