From: Ilya Dryomov Date: Tue, 30 Mar 2021 09:10:17 +0000 (+0200) Subject: auth/cephx: make cephx_decode_ticket() take a const ticket_blob X-Git-Tag: v14.2.20~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d8e045ad0833709d443b2638a469d7fb5453f7c5;p=ceph.git auth/cephx: make cephx_decode_ticket() take a const ticket_blob Signed-off-by: Ilya Dryomov (cherry picked from commit 6b860684c6e59b11c727206819805f89f0518575) --- diff --git a/src/auth/cephx/CephxProtocol.cc b/src/auth/cephx/CephxProtocol.cc index 5d44d847dc2..973b481f48b 100644 --- a/src/auth/cephx/CephxProtocol.cc +++ b/src/auth/cephx/CephxProtocol.cc @@ -369,8 +369,10 @@ void CephXTicketManager::validate_tickets(uint32_t mask, uint32_t& have, uint32_ << " need " << need << dendl; } -bool cephx_decode_ticket(CephContext *cct, KeyStore *keys, uint32_t service_id, - CephXTicketBlob& ticket_blob, CephXServiceTicketInfo& ticket_info) +bool cephx_decode_ticket(CephContext *cct, KeyStore *keys, + uint32_t service_id, + const CephXTicketBlob& ticket_blob, + CephXServiceTicketInfo& ticket_info) { uint64_t secret_id = ticket_blob.secret_id; CryptoKey service_secret; diff --git a/src/auth/cephx/CephxProtocol.h b/src/auth/cephx/CephxProtocol.h index 0aedc9d12d9..f80e6b760ea 100644 --- a/src/auth/cephx/CephxProtocol.h +++ b/src/auth/cephx/CephxProtocol.h @@ -416,7 +416,8 @@ WRITE_CLASS_ENCODER(CephXAuthorize) * Decode an extract ticket */ bool cephx_decode_ticket(CephContext *cct, KeyStore *keys, - uint32_t service_id, CephXTicketBlob& ticket_blob, + uint32_t service_id, + const CephXTicketBlob& ticket_blob, CephXServiceTicketInfo& ticket_info); /*