linux-imx/fs/f2fs
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.c posix_acl: Clear SGID bit when setting file permissions 2017-01-27 11:15:59 +01:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c mm: non-atomically mark page accessed during page cache allocation where possible 2014-09-26 11:52:05 +02:00
data.c f2fs: reserve the xattr space dynamically 2013-08-26 20:15:01 +09:00
debug.c f2fs: set ->owner for debugfs status file's file_operations 2017-01-26 17:22:37 +01:00
dir.c f2fs: fix handling orphan inodes 2013-07-30 15:17:03 +09:00
f2fs.h f2fs: support the inline xattrs 2013-08-26 20:15:23 +09:00
file.c f2fs: reserve the xattr space dynamically 2013-08-26 20:15:01 +09:00
gc.c f2fs: optimize gc for better performance 2013-09-05 13:50:32 +09:00
gc.h f2fs: optimize gc for better performance 2013-09-05 13:50:32 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: add flags for inline xattrs 2013-08-26 20:02:12 +09:00
Kconfig f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
namei.c f2fs: use strncasecmp() simplify the string comparison 2013-08-27 21:50:12 +09:00
node.c mm: non-atomically mark page accessed during page cache allocation where possible 2014-09-26 11:52:05 +02:00
node.h f2fs: fix the use of XATTR_NODE_OFFSET 2013-08-09 14:57:56 +09:00
recovery.c f2fs: reserve the xattr space dynamically 2013-08-26 20:15:01 +09:00
segment.c f2fs: fix a compound statement label error 2013-08-19 11:51:08 +09:00
segment.h f2fs: optimize gc for better performance 2013-09-05 13:50:32 +09:00
super.c f2fs: reserve the xattr space dynamically 2013-08-26 20:15:01 +09:00
xattr.c f2fs: support the inline xattrs 2013-08-26 20:15:23 +09:00
xattr.h f2fs: support the inline xattrs 2013-08-26 20:15:23 +09:00