summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-inode-write.h
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2011-12-06 11:35:33 +0530
committerAnand Avati <avati@gluster.com>2012-01-14 04:57:59 -0800
commit36cedb338ec1d021e189379f30100f0d983e3e01 (patch)
tree18f6cf77cb43bccd4f31a683e80341d47c10fa66 /xlators/cluster/afr/src/afr-inode-write.h
parent4e76cea78b11e9290b16c2faa85cf81b8e32b7ea (diff)
core/setxattr: prevent users from setting glusterfs xattrs
* Each xlator prevents the user from setting glusterfs-internal xattrs like trusted.gfid by handling it in respective setxattr functions. The speacial case of trusted.gfid is handled in fuse (Not in posix because posix_setxattr is used to set gfid). * For xlators which did not define setxattr and/or fsetxattr, the functions have been implemented with appropriate checks. xlator | fops-added _______________|__________________________ | 1. afr | fsetxattr 2. stripe | setxatrr and fsetxattr 3. quota | setxattr and fsetxattr Change-Id: Ib62abb7067415b23a708002f884d30e8866fbf48 BUG: 765487 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/685 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-write.h')
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.h b/xlators/cluster/afr/src/afr-inode-write.h
index f9aa7bd36f6..a2c3520f99f 100644
--- a/xlators/cluster/afr/src/afr-inode-write.h
+++ b/xlators/cluster/afr/src/afr-inode-write.h
@@ -63,7 +63,11 @@ afr_fsetattr (call_frame_t *frame, xlator_t *this,
int32_t
afr_setxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, dict_t *dict, int32_t flags);
+ loc_t *loc, dict_t *dict, int32_t flags);
+
+int32_t
+afr_fsetxattr (call_frame_t *frame, xlator_t *this,
+ fd_t *fd, dict_t *dict, int32_t flags);
int32_t
afr_removexattr (call_frame_t *frame, xlator_t *this,