]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: no snaps in system dirs, but root is ok
authorSage Weil <sage@newdream.net>
Tue, 24 Aug 2010 18:24:27 +0000 (11:24 -0700)
committerSage Weil <sage@newdream.net>
Tue, 24 Aug 2010 19:14:46 +0000 (12:14 -0700)
src/mds/Server.cc

index 3e52c790efc09cc9c082f826631bbeef0b2e11ca..f2d1df9c6cc3cc67583617c1cd58ebdae9d63816 100644 (file)
@@ -5651,6 +5651,11 @@ void Server::handle_client_mksnap(MDRequest *mdr)
     reply_request(mdr, -ENOTDIR);
     return;
   }
+  if (diri->is_system() && !diri->is_root()) {
+    // no snaps in system dirs (root is ok)
+    reply_request(mdr, -EPERM);
+    return;
+  }
 
   const string &snapname = req->get_filepath().last_dentry();
   dout(10) << "mksnap " << snapname << " on " << *diri << dendl;