[kernel] r16750 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Sun Jan 2 23:08:45 UTC 2011
Author: benh
Date: Sun Jan 2 23:08:35 2011
New Revision: 16750
Log:
btrfs: Require CAP_SYS_ADMIN for filesystem rebalance (Closes: #608185)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/btrfs-Require-CAP_SYS_ADMIN-for-filesystem-rebalance.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/30
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Sun Jan 2 22:47:11 2011 (r16749)
+++ dists/sid/linux-2.6/debian/changelog Sun Jan 2 23:08:35 2011 (r16750)
@@ -17,6 +17,7 @@
/boot/boot/grub (Closes: #607863)
* rt28x0: Add ieee80211_regdom module parameter mimicking cfg80211 as a
workaround for incorrect region code in NVRAM (Closes: #594561)
+ * btrfs: Require CAP_SYS_ADMIN for filesystem rebalance (Closes: #608185)
[ maximilian attems ]
* [openvz] Reenable NF_CONNTRACK_IPV6. (closes: #580507)
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/btrfs-Require-CAP_SYS_ADMIN-for-filesystem-rebalance.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/btrfs-Require-CAP_SYS_ADMIN-for-filesystem-rebalance.patch Sun Jan 2 23:08:35 2011 (r16750)
@@ -0,0 +1,41 @@
+Subject: [PATCH] btrfs: Require CAP_SYS_ADMIN for filesystem rebalance
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Wed, 29 Dec 2010 14:55:03 +0000
+
+Filesystem rebalancing (BTRFS_IOC_BALANCE) affects the entire
+filesystem and may run uninterruptibly for a long time. This does not
+seem to be something that an unprivileged user should be able to do.
+
+Reported-by: Aron Xu <happyaron.xu at gmail.com>
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ fs/btrfs/volumes.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
+index cc04dc1..2313e8b 100644
+--- a/fs/btrfs/volumes.c
++++ b/fs/btrfs/volumes.c
+@@ -22,6 +22,7 @@
+ #include <linux/blkdev.h>
+ #include <linux/random.h>
+ #include <linux/iocontext.h>
++#include <linux/capability.h>
+ #include <asm/div64.h>
+ #include "compat.h"
+ #include "ctree.h"
+@@ -1905,6 +1906,9 @@ int btrfs_balance(struct btrfs_root *dev_root)
+ if (dev_root->fs_info->sb->s_flags & MS_RDONLY)
+ return -EROFS;
+
++ if (!capable(CAP_SYS_ADMIN))
++ return -EPERM;
++
+ mutex_lock(&dev_root->fs_info->volume_mutex);
+ dev_root = dev_root->fs_info->dev_root;
+
+--
+1.7.2.3
+
+
+
Modified: dists/sid/linux-2.6/debian/patches/series/30
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/30 Sun Jan 2 22:47:11 2011 (r16749)
+++ dists/sid/linux-2.6/debian/patches/series/30 Sun Jan 2 23:08:35 2011 (r16750)
@@ -23,3 +23,4 @@
+ bugfix/all/exec-make-argv-envp-memory-visible-to-oom-killer-abi-change.patch
+ bugfix/all/exec-copy-and-paste-the-fixes-into-compat_do_execve-paths.patch
+ features/all/rt28x0-Add-ieee80211_regdom-module-parameter.patch
++ bugfix/all/btrfs-Require-CAP_SYS_ADMIN-for-filesystem-rebalance.patch
More information about the Kernel-svn-changes
mailing list