On Thu, Apr 28, 2022 at 03:12:30AM +0000, Al Viro wrote: > > Note, BTW, that while XFS has inode_fsuid_set() on the non-inode_init_owner() > > path, it doesn't have inode_fsgid_set() there. Same goes for ext4, while > > ext2 doesn't bother with either in such case... > > > > Let's try to separate the issues here. Jann, could you explain what makes > > empty sgid files dangerous? > > Found the original thread in old mailbox, and the method of avoiding the > SGID removal on modification is usable. Which answers the question above... OK, what do we want for grpid mounts? Aside of "don't forget inode_fsuid_set(), please", that is. We don't want inode_fsgid_set() there (whatever went for the parent directory should be the right value for the child). Same "strip SGID from non-directory child, unless we are in the resulting group"?