diff options
author | Christoph Hellwig <hch@lst.de> | 2008-06-11 21:53:58 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:03 -0400 |
commit | df5b5520b21d8a2554ede65c09b288833c77144d (patch) | |
tree | 6f4e2876c263b0b359cd3bba92bbf80fe139064d /fs/btrfs/ioctl.c | |
parent | f46b5a66b3316ef2f8febfe4c56e2d555e2c3979 (diff) |
BTRFS_IOC_TRANS_START should be privilegued
As mentioned in the comment next to it btrfs_ioctl_trans_start can
do bad damage to filesystems and thus should be limited to privilegued
users.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index da8de6cfdb5a..6fb455802759 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -706,6 +706,9 @@ long btrfs_ioctl_trans_start(struct file *file) | |||
706 | struct btrfs_trans_handle *trans; | 706 | struct btrfs_trans_handle *trans; |
707 | int ret = 0; | 707 | int ret = 0; |
708 | 708 | ||
709 | if (!capable(CAP_SYS_ADMIN)) | ||
710 | return -EPERM; | ||
711 | |||
709 | mutex_lock(&root->fs_info->fs_mutex); | 712 | mutex_lock(&root->fs_info->fs_mutex); |
710 | if (file->private_data) { | 713 | if (file->private_data) { |
711 | ret = -EINPROGRESS; | 714 | ret = -EINPROGRESS; |