diff options
author | Christoph Hellwig <hch@lst.de> | 2006-01-09 23:52:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:30 -0500 |
commit | 3542c6e18f6470bad2bde1e94331e4f488a8d3f1 (patch) | |
tree | 3f6cea6d0c3554439b76c219573e7633b2ba97c3 /fs/xfs/linux-2.6 | |
parent | b98932cb514eef404c6168c9a15cf28851498dea (diff) |
[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')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 5 |
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( | |||
530 | char *kbuf; | 530 | char *kbuf; |
531 | int error = EFAULT; | 531 | int error = EFAULT; |
532 | 532 | ||
533 | if (IS_RDONLY(&vp->v_inode)) | ||
534 | return -EROFS; | ||
533 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) | 535 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) |
534 | return EPERM; | 536 | return EPERM; |
535 | if (len > XATTR_SIZE_MAX) | 537 | if (len > XATTR_SIZE_MAX) |
@@ -557,6 +559,9 @@ xfs_attrmulti_attr_remove( | |||
557 | { | 559 | { |
558 | int error; | 560 | int error; |
559 | 561 | ||
562 | |||
563 | if (IS_RDONLY(&vp->v_inode)) | ||
564 | return -EROFS; | ||
560 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) | 565 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) |
561 | return EPERM; | 566 | return EPERM; |
562 | 567 | ||