From: Sage Weil Date: Mon, 25 Oct 2021 19:59:25 +0000 (-0400) Subject: mon/AuthMonitor: include pending_key in 'auth get-or-create' result X-Git-Tag: v18.0.0~39^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9fc4dc1f4f7989aedfee3469d54f7a56d77bb637;p=ceph.git mon/AuthMonitor: include pending_key in 'auth get-or-create' result Signed-off-by: Sage Weil --- diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index e103620b9f2c..aefdb5dd3f8a 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -932,11 +932,11 @@ bool AuthMonitor::preprocess_command(MonOpRequestRef op) } else if (prefix == "auth get" && !entity_name.empty()) { KeyRing keyring; EntityAuth entity_auth; - if(!mon.key_server.get_auth(entity, entity_auth)) { + if (!mon.key_server.get_auth(entity, entity_auth)) { ss << "failed to find " << entity_name << " in keyring"; r = -ENOENT; } else { - keyring.add(entity, entity_auth); + keyring.add(entity, entity_auth.key, entity_auth.pending_key); if (f) keyring.encode_formatted("auth", f.get(), rdata); else @@ -1690,7 +1690,7 @@ bool AuthMonitor::prepare_command(MonOpRequestRef op) } } else { KeyRing kr; - kr.add(entity, entity_auth.key); + kr.add(entity, entity_auth.key, entity_auth.pending_key); if (f) { kr.set_caps(entity, entity_auth.caps); kr.encode_formatted("auth", f.get(), rdata);