]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mon/AuthMonitor.cc
update sources to v12.1.2
[ceph.git] / ceph / src / mon / AuthMonitor.cc
index e6473c5e41769b57fe4ca2c5d0748bbad1c1bcd3..817e13d05542fbf4b3f3284466be8414693b6cb5 100644 (file)
@@ -620,7 +620,8 @@ bool AuthMonitor::preprocess_command(MonOpRequestRef op)
       auth.key.encode_plaintext(rdata);
     }
     r = 0;
-  } else if (prefix == "auth list") {
+  } else if (prefix == "auth list" ||
+            prefix == "auth ls") {
     if (f) {
       mon->key_server.encode_formatted("auth", f.get(), rdata);
     } else {
@@ -1463,6 +1464,8 @@ void AuthMonitor::upgrade_format()
       assert(r);
       ::encode("allow profile bootstrap-mgr", auth_inc.auth.caps["mon"]);
       auth_inc.op = KeyServerData::AUTH_INC_ADD;
+      // generate key
+      auth_inc.auth.key.create(g_ceph_context, CEPH_CRYPTO_AES);
       push_cephx_inc(auth_inc);
     }
     changed = true;