dout(20) << it.first << " cap = \"" << it.second << "\"" << dendl;
}
- err = _update_caps(entity, newcaps, op, ds, &rdata, f.get());
+ err = _update_caps(entity, newcaps, op, ss, ds, &rdata, f.get());
if (err == 0) {
return true;
} else {
}
}
- err = _create_entity(entity, newcaps, op, ds, &rdata, f.get());
+ err = _create_entity(entity, newcaps, op, ss, ds, &rdata, f.get());
if (err == 0) {
return true;
} else {
goto done;
}
} else if (prefix == "auth caps" && !entity_name.empty()) {
- err = _update_caps(entity, ceph_caps, op, ds, &rdata, f.get());
+ err = _update_caps(entity, ceph_caps, op, ss, ds, &rdata, f.get());
if (err == 0) {
return true;
} else {
* update and set create to True to allow authorizing a new entity instead
* of updating its caps. */
int AuthMonitor::_update_or_create_entity(const EntityName& entity,
- const map<string, string>& caps, MonOpRequestRef op, stringstream& ds,
- bufferlist* rdata, Formatter* fmtr, bool create_entity)
+ const map<string, string>& caps, MonOpRequestRef op, stringstream& ss,
+ stringstream& ds, bufferlist* rdata, Formatter* fmtr, bool create_entity)
{
- stringstream ss;
KeyServerData::Incremental auth_inc;
auth_inc.name = entity;
}
int AuthMonitor::_update_caps(const EntityName& entity,
- const map<string, string>& caps, MonOpRequestRef op, stringstream& ds,
- bufferlist* rdata, Formatter* fmtr)
+ const map<string, string>& caps, MonOpRequestRef op, stringstream& ss,
+ stringstream& ds, bufferlist* rdata, Formatter* fmtr)
{
- return _update_or_create_entity(entity, caps, op, ds, rdata, fmtr,
+ return _update_or_create_entity(entity, caps, op, ss, ds, rdata, fmtr,
false);
}
int AuthMonitor::_create_entity(const EntityName& entity,
- const map<string, string>& caps, MonOpRequestRef op, stringstream& ds,
- bufferlist* rdata, Formatter* fmtr)
+ const map<string, string>& caps, MonOpRequestRef op, stringstream& ss,
+ stringstream& ds, bufferlist* rdata, Formatter* fmtr)
{
- return _update_or_create_entity(entity, caps, op, ds, rdata, fmtr,
+ return _update_or_create_entity(entity, caps, op, ss, ds, rdata, fmtr,
true);
}
int _update_or_create_entity(const EntityName& entity,
const std::map<std::string, std::string>& caps, MonOpRequestRef op,
- std::stringstream& ds, bufferlist* rdata=nullptr, Formatter* fmtr=nullptr,
- bool create_entity=false);
+ std::stringstream& ss, std::stringstream& ds, bufferlist* rdata=nullptr,
+ Formatter* fmtr=nullptr, bool create_entity=false);
int _create_entity(const EntityName& entity,
const std::map<std::string, std::string>& caps, MonOpRequestRef op,
- std::stringstream& ds, bufferlist* rdata, Formatter* fmtr);
+ std::stringstream& ss, std::stringstream& ds, bufferlist* rdata,
+ Formatter* fmtr);
int _update_caps(const EntityName& entity,
const std::map<std::string, std::string>& caps, MonOpRequestRef op,
- std::stringstream& ds, bufferlist* rdata, Formatter* fmtr);
+ std::stringstream& ss, std::stringstream& ds, bufferlist* rdata,
+ Formatter* fmtr);
caps_update _gen_wanted_caps(EntityAuth& e_auth,
std::map<std::string, std::string>& newcaps, std::ostream& out);