generic/375 previously only tested SGID being cleared on a regular
file. It should test SGID being cleared on a directory too. Though
this is not required by POSIX, it is the Linux behavior.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Check if SGID is cleared upon chmod / setfacl when the owner is not
in the owning group. As of today, the kernel fails to clear SGID in
setxattr (which is what acl_set_file is implemented on top of) in
that case; see this patch:
https://patchwork.kernel.org/patch/9290507/
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>