]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
fuse2fs: fix in_file_group missing the primary process gid
authorDarrick J. Wong <djwong@kernel.org>
Fri, 5 Sep 2025 21:17:14 +0000 (14:17 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 17 Oct 2025 23:34:22 +0000 (16:34 -0700)
commit09fd20c8c658590286dba28f0a9754c227a2186f
tree7a9a87c4718a601e63041d424ac51c3a7fa17db2
parent2d211fdd8866fbd1b085f0628ce9dac9a4a80c10
fuse2fs: fix in_file_group missing the primary process gid

I forgot that Unix processes have both a primary group id and a list of
supplementary group ids.  The primary is provided by the fuse client;
the supplemental groups are noted by the Groups: field of
/proc/self/status.

If a process does not have /any/ supplemental group ids, then
in_file_group returns the wrong answer if the inode gid matches the
group id provided by the fuse client because it doesn't check that
anymore.  Make it so the primary group id check always happens.

Found by generic/375.

Cc: <linux-ext4@vger.kernel.org> # v1.47.3
Fixes: 3469e6ff606af8 ("fuse2fs: fix group membership checking in op_chmod")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
misc/fuse2fs.c