Prev: [182/200] KVM: SVM: Dont sync nested cr8 to lapic and back
Next: [135/200] Staging: comedi - correct parameter gainlkup for DAQCard-6024E in driver ni_mio_cs.c
From: Greg KH on 1 Jul 2010 17:40 2.6.34-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shi Weihua <shiwh(a)cn.fujitsu.com> commit 2f26afba46f0ebf155cf9be746496a0304a5b7cf upstream. On btrfs, do the following ------------------ # su user1 # cd btrfs-part/ # touch aaa # getfacl aaa # file: aaa # owner: user1 # group: user1 user::rw- group::rw- other::r-- # su user2 # cd btrfs-part/ # setfacl -m u::rwx aaa # getfacl aaa # file: aaa # owner: user1 # group: user1 user::rwx <- successed to setfacl group::rw- other::r-- ------------------ but we should prohibit it that user2 changing user1's acl. In fact, on ext3 and other fs, a message occurs: setfacl: aaa: Operation not permitted This patch fixed it. Signed-off-by: Shi Weihua <shiwh(a)cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason(a)oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- fs/btrfs/acl.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -160,6 +160,9 @@ static int btrfs_xattr_acl_set(struct de int ret; struct posix_acl *acl = NULL; + if (!is_owner_or_cap(dentry->d_inode)) + return -EPERM; + if (value) { acl = posix_acl_from_xattr(value, size); if (acl == NULL) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |