]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
auth/cephx: make KeyServer::build_session_auth_info() less confusing
authorIlya Dryomov <idryomov@gmail.com>
Thu, 15 Apr 2021 13:18:58 +0000 (15:18 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 16 Apr 2021 12:43:27 +0000 (14:43 +0200)
commit90df5e6ff7f457b7a8748419ddc434c363b27106
treeec66fda9023891999bd2ea7b7d26cef71a31739f
parentf31f287797978387f9e104a6a7ade4646eca1db7
auth/cephx: make KeyServer::build_session_auth_info() less confusing

The second KeyServer::build_session_auth_info() overload is used only
by the monitor, for mon <-> mon authentication.  The monitor passes in
service_secret (mon secret) and secret_id (-1).  The TTL is irrelevant
because there is no rotation.

However the signature doesn't make it obvious.  Clarify that
service_secret and secret_id are input parameters and info is the only
output parameter.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 6f12cd3688b753633c8ff29fb3bd64758f960b2b)
src/auth/cephx/CephxKeyServer.cc
src/auth/cephx/CephxKeyServer.h
src/mon/Monitor.cc