if (key.length() == 0)
key = op->get_oid().name;
- const OSDCapSpec *spec = caps.get_cap(session->auid, pg->pool->name, pg->pool->auid, key);
+ const OSDCapSpec *spec = caps.get_cap(pg->pool->name, pg->pool->auid, key);
// just do the rwx, for now!
rwxa_t perm = spec ? spec->allow : 0;
return out;
}
-bool OSDCapMatch::is_match(int64_t a, const string& pn, int64_t pool_auid, const string& object) const
+bool OSDCapMatch::is_match(const string& pn, int64_t pool_auid, const string& object) const
{
if (auid >= 0) {
if (auid != pool_auid)
grants.push_back(OSDCapGrant(OSDCapMatch(), OSDCapSpec(OSD_CAP_ANY)));
}
-const OSDCapSpec *OSDCap::get_cap(int64_t auid, const string& pool_name, int64_t pool_auid, const string& object) const
+const OSDCapSpec *OSDCap::get_cap(const string& pool_name, int64_t pool_auid, const string& object) const
{
for (vector<OSDCapGrant>::const_iterator p = grants.begin(); p != grants.end(); ++p) {
- if (p->match.is_match(auid, pool_name, pool_auid, object))
+ if (p->match.is_match(pool_name, pool_auid, object))
return &p->spec;
}
return NULL;
* @param object object name
* @return true if we match, false otherwise
*/
- bool is_match(int64_t auid, const std::string& pool_name, int64_t pool_auid, const std::string& object) const;
+ bool is_match(const std::string& pool_name, int64_t pool_auid, const std::string& object) const;
};
ostream& operator<<(ostream& out, const OSDCapMatch& m);
void set_allow_all();
bool parse(const std::string& str, ostream *err=NULL);
- const OSDCapSpec *get_cap(int64_t auid, const std::string& pool_name, int64_t pool_auid, const std::string& object) const;
+ const OSDCapSpec *get_cap(const std::string& pool_name, int64_t pool_auid, const std::string& object) const;
};
static inline ostream& operator<<(ostream& out, const OSDCap& cap)