]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: add display auid to KeyServer::encode_secrets
authorLoic Dachary <loic-201408@dachary.org>
Wed, 15 Oct 2014 18:30:32 +0000 (11:30 -0700)
committerLoic Dachary <loic-201408@dachary.org>
Wed, 15 Oct 2014 18:31:51 +0000 (11:31 -0700)
http://tracker.ceph.com/issues/9790 Fixes: #9790

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/auth/cephx/CephxKeyServer.cc

index e57b55751424dedabd098167dbae298491abe276..b2c0c672aedeb65b03c4ab03e55964a615e242e7 100644 (file)
@@ -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");
     }