From: Sage Weil Date: Mon, 14 May 2012 22:19:31 +0000 (-0700) Subject: mon: 'auth list' is a read-only operation X-Git-Tag: v0.48argonaut~137^2~44^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=86f24868e406e60ea01b93ae208cfebb8519aa6b;p=ceph.git mon: 'auth list' is a read-only operation Signed-off-by: Sage Weil --- diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index b9689fc77877..c2f68b62a08f 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -431,8 +431,7 @@ bool AuthMonitor::preprocess_command(MMonCommand *m) if (m->cmd[1] == "add" || m->cmd[1] == "del" || m->cmd[1] == "get-or-create" || - m->cmd[1] == "caps" || - m->cmd[1] == "list") { + m->cmd[1] == "caps") { return false; } else if (m->cmd[1] == "export") { @@ -498,6 +497,11 @@ bool AuthMonitor::preprocess_command(MMonCommand *m) ss << auth.key; r = 0; } + else if (m->cmd[1] == "list") { + mon->key_server.list_secrets(ss); + r = 0; + goto done; + } else { auth_usage(ss); r = -EINVAL; @@ -710,11 +714,6 @@ bool AuthMonitor::prepare_command(MMonCommand *m) paxos->wait_for_commit(new Monitor::C_Command(mon, m, 0, rs, paxos->get_version())); return true; } - else if (m->cmd[1] == "list") { - mon->key_server.list_secrets(ss); - err = 0; - goto done; - } else { auth_usage(ss); }