]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
auth/KeyRing: do not decode a copy of bl
authorKefu Chai <kchai@redhat.com>
Wed, 2 Jun 2021 03:59:16 +0000 (11:59 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 2 Jun 2021 03:59:18 +0000 (11:59 +0800)
commit594c5dc005a66497d495e154043c09bbcf963504
treebf44d4393ff0be99a0578d618b60e30bb6ded148
parent1bfd785307684f3fc2423f87608e4a84e374b64c
auth/KeyRing: do not decode a copy of bl

i checked all the code paths calling into KeyRing::decode(), none of
them relies on the behavior that the bl is not mutated after the
iterator is decoded.

actually, it is more intuitive to always move the iterator forward when
decoding the encoded keyring in the bufferlist.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/auth/KeyRing.cc