summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-09 20:52:00 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 08:01:30 -0800
commit3542c6e18f6470bad2bde1e94331e4f488a8d3f1 (patch)
tree3f6cea6d0c3554439b76c219573e7633b2ba97c3 /fs/xfs/linux-2.6/xfs_ioctl.c
parentb98932cb514eef404c6168c9a15cf28851498dea (diff)
downloadblackbird-op-linux-3542c6e18f6470bad2bde1e94331e4f488a8d3f1.tar.gz
blackbird-op-linux-3542c6e18f6470bad2bde1e94331e4f488a8d3f1.zip
[PATCH] remove xfs xattr permission checks
remove checks now in the VFS XFS has an additional xattr interface through obscure ioctl. it requires raised capabilities but we need to add some read-only/immutable checks anyway Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index b78b5eb9e96c..f98c5be3dfe7 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -530,6 +530,8 @@ xfs_attrmulti_attr_set(
char *kbuf;
int error = EFAULT;
+ if (IS_RDONLY(&vp->v_inode))
+ return -EROFS;
if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode))
return EPERM;
if (len > XATTR_SIZE_MAX)
@@ -557,6 +559,9 @@ xfs_attrmulti_attr_remove(
{
int error;
+
+ if (IS_RDONLY(&vp->v_inode))
+ return -EROFS;
if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode))
return EPERM;
OpenPOWER on IntegriCloud