]> git.baikalelectronics.ru Git - 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)
committerMike Marshall <hubcap@omnibond.com>
Thu, 14 Sep 2017 18:54:37 +0000 (14:54 -0400)
commitd8db308fc5baa0d535ddf99ef3274480f26cfbf2
tree0f546045e8ab5b3dd2bfcd49762fca6845bd0418
parent5807ba3518e1717d728a6890608cb26261dd7af6
orangefs: 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 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: b93308b56096afa920d6e36d3aad8d07e559d96e
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>
fs/orangefs/acl.c