Skip to content

Commit b5bbd74

Browse files
committed
also check supplementary groups for write access in traverse_secure_open
1 parent 4fbe374 commit b5bbd74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/system/audit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ fn traversed_secure_open(path: impl AsRef<Path>, forbidden_user: &User) -> io::R
262262

263263
if perms & mode(Category::World, Op::Write) != 0
264264
|| (perms & mode(Category::Group, Op::Write) != 0)
265-
&& forbidden_user.gid.inner() == meta.gid()
265+
&& forbidden_user.in_group_by_gid(GroupId::new(meta.gid()))
266266
|| (perms & mode(Category::Owner, Op::Write) != 0)
267267
&& forbidden_user.uid.inner() == meta.uid()
268268
{

0 commit comments

Comments
 (0)