From 204fc1205af14bdd98d9a86b9f7293c5b7f6747a Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Tue, 1 Mar 2011 03:16:29 +0000 Subject: v2 Prevent removal of trusted.gfid xattr Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 2461 (remove xattr of trusted.gfid succeeds) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2461 --- xlators/storage/posix/src/posix.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/storage/posix/src/posix.c') 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); -- cgit