From: Loic Dachary Date: Wed, 15 Oct 2014 18:30:32 +0000 (-0700) Subject: auth: add display auid to KeyServer::encode_secrets X-Git-Tag: v0.88~65^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fcc36922ed04f940678a431e7cdde6b20bf0c051;p=ceph.git auth: add display auid to KeyServer::encode_secrets http://tracker.ceph.com/issues/9790 Fixes: #9790 Signed-off-by: Loic Dachary --- diff --git a/src/auth/cephx/CephxKeyServer.cc b/src/auth/cephx/CephxKeyServer.cc index e57b55751424..b2c0c672aede 100644 --- a/src/auth/cephx/CephxKeyServer.cc +++ b/src/auth/cephx/CephxKeyServer.cc @@ -312,11 +312,15 @@ int KeyServer::encode_secrets(Formatter *f, stringstream *ds) const if (ds) { *ds << name.to_str() << std::endl; *ds << "\tkey: " << mapiter->second.key << std::endl; + if (mapiter->second.auid != CEPH_AUTH_UID_DEFAULT) + *ds << "\tauid: " << mapiter->second.auid << std::endl; } if (f) { f->open_object_section("auth_entities"); f->dump_string("entity", name.to_str()); f->dump_stream("key") << mapiter->second.key; + if (mapiter->second.auid != CEPH_AUTH_UID_DEFAULT) + f->dump_int("auid", mapiter->second.auid); f->open_object_section("caps"); }