From 77ef3e1d9b4584263d366c1d0ee60c466bbb269a Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Tue, 30 Mar 2021 11:10:17 +0200 Subject: [PATCH] auth/cephx: make cephx_decode_ticket() take a const ticket_blob Signed-off-by: Ilya Dryomov (cherry picked from commit 6b860684c6e59b11c727206819805f89f0518575) --- src/auth/cephx/CephxProtocol.cc | 6 ++++-- src/auth/cephx/CephxProtocol.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/auth/cephx/CephxProtocol.cc b/src/auth/cephx/CephxProtocol.cc index ef95b66aa1c2..0a0a5b7f492e 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 6c2d53a0951c..c8f9f92dd398 100644 --- a/src/auth/cephx/CephxProtocol.h +++ b/src/auth/cephx/CephxProtocol.h @@ -415,7 +415,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); /* -- 2.47.3