]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDSAuthCaps: whitespace
authorSage Weil <sage@redhat.com>
Thu, 28 May 2015 04:00:39 +0000 (00:00 -0400)
committerSage Weil <sage@redhat.com>
Thu, 1 Oct 2015 13:39:29 +0000 (09:39 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mds/MDSAuthCaps.h

index 2878c79f852a53703aaa413198e526c27c210613..202c26f9ecfe66776d6f9a159423946b57d5ff8e 100644 (file)
@@ -29,7 +29,9 @@ struct MDSCapSpec {
   MDSCapSpec() : read(false), write(false), any(false) {}
   MDSCapSpec(bool r_, bool w_, bool a_) : read(r_), write(w_), any(a_) {}
 
-  bool allow_all() const {return any;}
+  bool allow_all() const {
+    return any;
+  }
 };
 
 struct MDSCapMatch {
@@ -50,7 +52,9 @@ struct MDSCapMatch {
   }
 
   bool match(const std::string &target_path, const int target_uid) const {
-    return (target_path.find(path) == 0 && (target_uid == uid || uid == MDS_AUTH_UID_ANY)); 
+    return
+      (target_path.find(path) == 0 &&
+       (target_uid == uid || uid == MDS_AUTH_UID_ANY));
   }
 };
 
@@ -58,24 +62,28 @@ struct MDSCapGrant {
   MDSCapSpec spec;
   MDSCapMatch match;
 
-  MDSCapGrant(const MDSCapSpec &spec_, const MDSCapMatch &match_) : spec(spec_), match(match_) {}
+  MDSCapGrant(const MDSCapSpec &spec_, const MDSCapMatch &match_)
+    : spec(spec_), match(match_) {}
   MDSCapGrant() {}
 };
 
 class MDSAuthCaps
 {
-    protected:
-    std::vector<MDSCapGrant> grants;
-
-    public:
-    void set_allow_all();
-    bool parse(const std::string &str, std::ostream *err);
-    MDSAuthCaps() {}
-    MDSAuthCaps(const std::vector<MDSCapGrant> &grants_) : grants(grants_) {}
-
-    bool allow_all() const;
-    bool is_capable(const std::string &path, int uid, bool may_read, bool may_write) const;
-    friend std::ostream &operator<<(std::ostream &out, const MDSAuthCaps &cap);
+protected:
+  std::vector<MDSCapGrant> grants;
+
+public:
+  MDSAuthCaps() {}
+  MDSAuthCaps(const std::vector<MDSCapGrant> &grants_) : grants(grants_) {}
+
+  void set_allow_all();
+  bool parse(const std::string &str, std::ostream *err);
+
+  bool allow_all() const;
+  bool is_capable(const std::string &path, int uid,
+                 bool may_read, bool may_write) const;
+
+  friend std::ostream &operator<<(std::ostream &out, const MDSAuthCaps &cap);
 };