linux-imx/fs/hfsplus
Jan Kara a88a2be387 posix_acl: Clear SGID bit when setting file permissions
commit 073931017b upstream.

When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok().  Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't clear the setgid bit in
a similar way; this allows to bypass the check in chmod(2).  Fix that.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
2017-01-27 11:15:59 +01:00
..
acl.h hfsplus: add necessary declarations for POSIX ACLs support 2013-09-11 15:59:00 -07:00
attributes.c hfs/hfsplus: convert printks to pr_<level> 2013-04-30 17:04:05 -07:00
bfind.c hfs/hfsplus: convert printks to pr_<level> 2013-04-30 17:04:05 -07:00
bitmap.c hfsplus: remove duplicated message prefix in hfsplus_block_free() 2013-04-30 17:04:05 -07:00
bnode.c hfs,hfsplus: cache pages correctly between bnode_create and bnode_free 2015-09-30 13:47:37 +02:00
brec.c hfsplus: fix B-tree corruption after insertion at position 0 2015-04-09 14:14:12 +02:00
btree.c hfs/hfsplus: convert printks to pr_<level> 2013-04-30 17:04:05 -07:00
catalog.c hfs/hfsplus: convert printks to pr_<level> 2013-04-30 17:04:05 -07:00
dir.c hfsplus: emit proper file type from readdir 2014-11-19 23:44:32 +01:00
extents.c fs/hfsplus/extents.c: fix concurrent acess of alloc_blocks 2014-11-19 23:44:32 +01:00
hfsplus_fs.h hfsplus: add necessary declarations for POSIX ACLs support 2013-09-11 15:59:00 -07:00
hfsplus_raw.h hfsplus: add on-disk layout declarations related to attributes tree 2013-02-27 19:10:10 -08:00
inode.c truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
ioctl.c hfsplus: add support of manipulation by attributes file 2013-02-27 19:10:10 -08:00
Kconfig hfsplus: add necessary declarations for POSIX ACLs support 2013-09-11 15:59:00 -07:00
Makefile hfsplus: integrate POSIX ACLs support into driver 2013-09-11 15:59:01 -07:00
options.c hfsplus: fix remount issue 2014-11-19 23:44:32 +01:00
part_tbl.c hfsplus: ensure bio requests are not smaller than the hardware sectors 2011-07-22 16:37:44 +02:00
posix_acl.c posix_acl: Clear SGID bit when setting file permissions 2017-01-27 11:15:59 +01:00
super.c hfs/hfsplus: convert printks to pr_<level> 2013-04-30 17:04:05 -07:00
tables.c
unicode.c Don't pass inode to ->d_hash() and ->d_compare() 2013-06-29 12:57:36 +04:00
wrapper.c hfs/hfsplus: convert printks to pr_<level> 2013-04-30 17:04:05 -07:00
xattr_security.c hfsplus: integrate POSIX ACLs support into driver 2013-09-11 15:59:01 -07:00
xattr_trusted.c hfsplus: rework functionality of getting, setting and deleting of extended attributes 2013-02-27 19:10:10 -08:00
xattr_user.c hfsplus: rework functionality of getting, setting and deleting of extended attributes 2013-02-27 19:10:10 -08:00
xattr.c posix_acl: Clear SGID bit when setting file permissions 2017-01-27 11:15:59 +01:00
xattr.h hfsplus: integrate POSIX ACLs support into driver 2013-09-11 15:59:01 -07:00