summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-03-01 03:16:29 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-03-01 02:05:35 -0800
commit204fc1205af14bdd98d9a86b9f7293c5b7f6747a (patch)
tree9a27457210d934a047210cea833ac3acd56c6cb5
parentb99e0e06788380e41d6c08ea308a6dd87a7afdfe (diff)
v2 Prevent removal of trusted.gfid xattr
Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2461 (remove xattr of trusted.gfid succeeds) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2461
-rw-r--r--xlators/storage/posix/src/posix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index b63300fb945..457a3511880 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3421,6 +3421,12 @@ posix_removexattr (call_frame_t *frame, xlator_t *this,
DECLARE_OLD_FS_ID_VAR;
+ if (!strcmp (GFID_XATTR_KEY, name)) {
+ gf_log (this->name, GF_LOG_WARNING, "Remove xattr called"
+ " on gfid for file %s", loc->path);
+ goto out;
+ }
+
MAKE_REAL_PATH (real_path, this, loc->path);
SET_FS_ID (frame->root->uid, frame->root->gid);