]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/MDSAuthCaps.cc
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / mds / MDSAuthCaps.cc
index f8158be686645ee7f5e4d289df2cb8c56dc2ecac..d983f2d58b19aa173041de5fb1b8004e4effe249 100644 (file)
@@ -227,15 +227,14 @@ bool MDSAuthCaps::is_capable(std::string_view inode_path,
                             uid_t new_uid, gid_t new_gid,
                             const entity_addr_t& addr) const
 {
-  if (cct)
-    ldout(cct, 10) << __func__ << " inode(path /" << inode_path
-                  << " owner " << inode_uid << ":" << inode_gid
-                  << " mode 0" << std::oct << inode_mode << std::dec
-                  << ") by caller " << caller_uid << ":" << caller_gid
+  ldout(g_ceph_context, 10) << __func__ << " inode(path /" << inode_path
+                << " owner " << inode_uid << ":" << inode_gid
+                << " mode 0" << std::oct << inode_mode << std::dec
+                << ") by caller " << caller_uid << ":" << caller_gid
 // << "[" << caller_gid_list << "]";
-                  << " mask " << mask
-                  << " new " << new_uid << ":" << new_gid
-                  << " cap: " << *this << dendl;
+                << " mask " << mask
+                << " new " << new_uid << ":" << new_gid
+                << " cap: " << *this << dendl;
 
   for (const auto& grant : grants) {
     if (grant.network.size() &&
@@ -339,7 +338,7 @@ void MDSAuthCaps::set_allow_all()
                                 {}));
 }
 
-bool MDSAuthCaps::parse(CephContext *c, std::string_view str, ostream *err)
+bool MDSAuthCaps::parse(std::string_view str, ostream *err)
 {
   // Special case for legacy caps
   if (str == "allow") {
@@ -354,7 +353,6 @@ bool MDSAuthCaps::parse(CephContext *c, std::string_view str, ostream *err)
   MDSCapParser<decltype(iter)> g;
 
   bool r = qi::phrase_parse(iter, end, g, ascii::space, *this);
-  cct = c;  // set after parser self-assignment
   if (r && iter == end) {
     for (auto& grant : grants) {
       std::sort(grant.match.gids.begin(), grant.match.gids.end());