You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a dedicated helper to handle the setgid bit when creating a new file
in a setgid directory. This is a preparatory patch for moving setgid
stripping into the vfs. The patch contains no functional changes.
Currently the setgid stripping logic is open-coded directly in
inode_init_owner() and the individual filesystems are responsible for
handling setgid inheritance. Since this has proven to be brittle as
evidenced by old issues we uncovered over the last months (see [1] to
[3] below) we will try to move this logic into the vfs.
Link: e014f37 ("xfs: use setattr_copy to set vfs inode attributes") [1]
Link: 01ea173 ("xfs: fix up non-directory creation in SGID directories") [2]
Link: fd84bfd ("ceph: fix up non-directory creation in SGID directories") [3]
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christian Brauner (Microsoft) <[email protected]>
Reviewed-and-Tested-by: Jeff Layton <[email protected]>
Signed-off-by: Yang Xu <[email protected]>
Signed-off-by: Christian Brauner (Microsoft) <[email protected]>
0 commit comments