diff options
author | Junaid <junaid@gluster.com> | 2011-07-25 14:59:25 +0530 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-07-29 01:18:20 -0700 |
commit | 426c6e6b24748c0826cc97e8f736bc87a1c8df04 (patch) | |
tree | 5839dec2474b737e36a2da561f53676ecacf8006 /xlators/features/marker/src/marker.h | |
parent | 508cd242ea3495f987cf9f34c627482bfc68949b (diff) |
features/marker-quota: Perform removexattr with frame uid and gid set to root.
Change-Id: Iabd8ff835c76d828e4af50ce4941d2ff86797eee
BUG: 3194
Reviewed-on: http://review.gluster.com/99
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <raghavendra@gluster.com>
Diffstat (limited to 'xlators/features/marker/src/marker.h')
-rw-r--r-- | xlators/features/marker/src/marker.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker.h b/xlators/features/marker/src/marker.h index 8f4e11a5beb..b18bd33427f 100644 --- a/xlators/features/marker/src/marker.h +++ b/xlators/features/marker/src/marker.h @@ -47,6 +47,8 @@ enum { _local->pid = _frame->root->pid; \ memset (&_local->loc, 0, sizeof (loc_t)); \ _local->ref = 1; \ + _local->uid = -1; \ + _local->gid = -1; \ LOCK_INIT (&_local->lock); \ _local->oplocal = NULL; \ } while (0) @@ -62,12 +64,23 @@ enum { } \ } while (0) +#define MARKER_SET_UID_GID(dest, src) \ + do { \ + if (src->uid != -1 && \ + src->gid != -1) { \ + dest->uid = src->uid; \ + dest->gid = src->gid; \ + } \ + } while (0) + struct marker_local{ uint32_t timebuf[2]; pid_t pid; loc_t loc; loc_t parent_loc; loc_t *next_lock_on; + uid_t uid; + gid_t gid; int32_t ref; int32_t ia_nlink; gf_lock_t lock; |