diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-03-31 07:26:58 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-31 07:43:43 -0700 |
commit | d337c518a5b6aad42db1489a5093efa6692962dc (patch) | |
tree | 1904c5cc7e23f9813716e03713c6843fcc1189ba /libglusterfs/src/iatt.h | |
parent | 31e69430140538f5fee3e8dc89bd2971917820d1 (diff) |
core: Add iatt protection bit testing macros
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 400 (Support auxiliary gids in GlusterFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=400
Diffstat (limited to 'libglusterfs/src/iatt.h')
-rw-r--r-- | libglusterfs/src/iatt.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libglusterfs/src/iatt.h b/libglusterfs/src/iatt.h index e94aa05baa5..92d679f4c17 100644 --- a/libglusterfs/src/iatt.h +++ b/libglusterfs/src/iatt.h @@ -85,6 +85,21 @@ struct iatt { #define IA_ISFIFO(t) (t == IA_IFIFO) #define IA_ISSOCK(t) (t == IA_IFSOCK) +#define IA_PROT_RUSR(prot) ((prot).owner.read == 1) +#define IA_PROT_WUSR(prot) ((prot).owner.write == 1) +#define IA_PROT_XUSR(prot) ((prot).owner.exec == 1) + +#define IA_PROT_RGRP(prot) ((prot).group.read == 1) +#define IA_PROT_WGRP(prot) ((prot).group.write == 1) +#define IA_PROT_XGRP(prot) ((prot).group.exec == 1) + +#define IA_PROT_ROTH(prot) ((prot).other.read == 1) +#define IA_PROT_WOTH(prot) ((prot).other.write == 1) +#define IA_PROT_XOTH(prot) ((prot).other.exec == 1) + +#define IA_PROT_SUID(prot) ((prot).suid == 1) +#define IA_PROT_SGID(prot) ((prot).sgid == 1) +#define IA_PROT_STCKY(prot) ((prot).sticky == 1) static inline uint32_t ia_major (uint64_t ia_dev) |