switch-linux/fs/ext4
Jan Kara a3bb2d5587 ext4: Don't clear SGID when inheriting ACLs
When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit
set, DIR1 is expected to have SGID bit set (and owning group equal to
the owning group of 'DIR0'). However when 'DIR0' also has some default
ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on
'DIR1' to get cleared if user is not member of the owning group.

Fix the problem by moving posix_acl_update_mode() out of
__ext4_set_acl() into ext4_set_acl(). That way the function will not be
called when inheriting ACLs which is what we want as it prevents SGID
bit clearing and the mode has been properly set by posix_acl_create()
anyway.

Fixes: 073931017b
CC: stable@vger.kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
2017-07-30 23:33:01 -04:00
..
acl.c ext4: Don't clear SGID when inheriting ACLs 2017-07-30 23:33:01 -04:00
acl.h
balloc.c
bitmap.c
block_validity.c
dir.c
ext4.h ext4: remove unused metadata accounting variables 2017-07-30 22:30:11 -04:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
extents.c
extents_status.c
extents_status.h
file.c The first major feature for ext4 this merge window is the largedir 2017-07-09 09:31:22 -07:00
fsmap.c
fsmap.h
fsync.c
hash.c
ialloc.c
indirect.c
inline.c
inode.c ext4: correct comment references to ext4_ext_direct_IO() 2017-07-30 22:26:40 -04:00
ioctl.c
Kconfig
Makefile
mballoc.c
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c
page-io.c
readpage.c
resize.c
super.c ext4: remove unused metadata accounting variables 2017-07-30 22:30:11 -04:00
symlink.c
sysfs.c
truncate.h
xattr.c
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c