From: Sage Weil Date: Thu, 28 May 2015 04:00:39 +0000 (-0400) Subject: mds/MDSAuthCaps: whitespace X-Git-Tag: v10.0.0~123^2~102 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=57a1860d2d3b05bb31ff4aa97c9968db06013c48;p=ceph.git mds/MDSAuthCaps: whitespace Signed-off-by: Sage Weil --- diff --git a/src/mds/MDSAuthCaps.h b/src/mds/MDSAuthCaps.h index 2878c79f852..202c26f9ecf 100644 --- a/src/mds/MDSAuthCaps.h +++ b/src/mds/MDSAuthCaps.h @@ -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 grants; - - public: - void set_allow_all(); - bool parse(const std::string &str, std::ostream *err); - MDSAuthCaps() {} - MDSAuthCaps(const std::vector &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 grants; + +public: + MDSAuthCaps() {} + MDSAuthCaps(const std::vector &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); };