From 9e9cec694ac89c1c2ed162bad68ce5da362cc3b3 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Tue, 21 Jun 2011 11:15:37 -0700 Subject: [PATCH] AuthNone: encode entity name in authorizer Signed-off-by: Colin McCabe --- src/auth/none/AuthNoneClientHandler.h | 2 +- src/auth/none/AuthNoneProtocol.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/auth/none/AuthNoneClientHandler.h b/src/auth/none/AuthNoneClientHandler.h index 1770c253bdaa1..61c1db93ec984 100644 --- a/src/auth/none/AuthNoneClientHandler.h +++ b/src/auth/none/AuthNoneClientHandler.h @@ -38,7 +38,7 @@ public: AuthAuthorizer *build_authorizer(uint32_t service_id) { AuthNoneAuthorizer *auth = new AuthNoneAuthorizer(); if (auth) { - auth->build_authorizer(global_id); + auth->build_authorizer(cct->_conf->name, global_id); } return auth; } diff --git a/src/auth/none/AuthNoneProtocol.h b/src/auth/none/AuthNoneProtocol.h index 08332328c1c1e..a3c989128f65e 100644 --- a/src/auth/none/AuthNoneProtocol.h +++ b/src/auth/none/AuthNoneProtocol.h @@ -19,9 +19,10 @@ struct AuthNoneAuthorizer : public AuthAuthorizer { AuthNoneAuthorizer() : AuthAuthorizer(CEPH_AUTH_NONE) { } - bool build_authorizer(uint64_t global_id) { + bool build_authorizer(const EntityName &ename, uint64_t global_id) { __u8 struct_v = 1; ::encode(struct_v, bl); + ::encode(ename, bl); ::encode(global_id, bl); return 0; } -- 2.39.5