]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
orangefs: Don't clear SGID when inheriting ACLs
authorJan Kara <jack@suse.cz>
Thu, 22 Jun 2017 13:31:13 +0000 (15:31 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 28 Sep 2017 14:30:57 +0000 (10:30 -0400)
commit8f7d61036e6b1f2feab9cffebc39148cfc5f96d5
treee48f08dd4bbed5cb789f17e3336533235b91e947
parent938998951f41df6bdd1959f30757bde5eff548ca
orangefs: Don't clear SGID when inheriting ACLs

BugLink: http://bugs.launchpad.net/bugs/1720154
commit b5accbb0dfae36d8d36cd882096943c98d5ede15 upstream.

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 creating __orangefs_set_acl() function that does not
call posix_acl_update_mode() and use it when inheriting ACLs. That
prevents SGID bit clearing and the mode has been properly set by
posix_acl_create() anyway.

Fixes: 073931017b49d9458aa351605b43a7e34598caef
CC: stable@vger.kernel.org
CC: Mike Marshall <hubcap@omnibond.com>
CC: pvfs2-developers@beowulf-underground.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/orangefs/acl.c