}
}
+ if (!valid_caps(caps_vec, &ss)) {
+ err = -EINVAL;
+ goto done;
+ }
+
// are we about to have it?
if (entity_is_pending(entity)) {
wait_for_finished_proposal(op,
get_last_committed() + 1));
return true;
} else if ((prefix == "auth get-or-create-key" ||
- prefix == "auth get-or-create") &&
+ prefix == "auth get-or-create") &&
!entity_name.empty()) {
// auth get-or-create <name> [mon osdcapa osd osdcapb ...]
string mds_cap_string, osd_cap_string;
string osd_cap_wanted = "r";
+ if (!valid_caps(caps_vec, &ss)) {
+ err = -EINVAL;
+ goto done;
+ }
+
for (auto it = caps_vec.begin();
it != caps_vec.end() && (it + 1) != caps_vec.end();
it += 2) {