Files
Jan Kara dd2421b5ed posix_acl: Clear SGID bit when setting file permissions
commit 073931017b49d9458aa351605b43a7e34598caef 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>
[wt: dropped hfsplus changes : no xattr in 3.10]
Signed-off-by: Willy Tarreau <w@1wt.eu>
2017-06-08 00:46:47 +02:00
..
2011-07-25 14:30:23 -04:00
2012-07-30 17:25:16 -07:00
2013-02-22 23:31:31 -05:00
2012-03-31 16:03:16 -04:00
2012-03-31 16:03:16 -04:00
2013-05-07 20:16:25 -07:00
2013-02-22 23:31:31 -05:00
2010-07-23 12:50:55 +02:00
2012-10-09 23:21:42 +02:00
2012-03-31 16:03:16 -04:00
2012-03-31 16:03:16 -04:00
2012-03-31 16:03:16 -04:00