]> 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)
commite2b6af09cd0fc0c0eed572eeeef17c644bc7c346
tree0f546045e8ab5b3dd2bfcd49762fca6845bd0418
parent5082b22208743832f7bfd1950a52aad22b806282
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: 73d2a5a66f321d4357d9d79e9b9913e4e48704af
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