Skip to content

Commit

Permalink
modif: keep pipewire group unless nosound is used
Browse files Browse the repository at this point in the history
This group is apparently used on Gentoo[1].

Currently only the "audio" supplementary group is kept.

Fixes netblue30#5992.

See also commit f329386 ("Keep vglusers group unless no3d is used
(virtualgl)", 2022-01-07) / PR netblue30#4851.

[1] https://wiki.gentoo.org/wiki/PipeWire

Reported-by: @amano-kenji
  • Loading branch information
kmk3 committed Sep 7, 2023
1 parent 4b8f1d2 commit a1597e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/firejail/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3224,6 +3224,11 @@ int main(int argc, char **argv, char **envp) {
sprintf(ptr, "%d %d 1\n", g, g);
ptr += strlen(ptr);
}
g = get_group_id("pipewire");
if (g) {
sprintf(ptr, "%d %d 1\n", g, g);
ptr += strlen(ptr);
}
}

// add video group
Expand Down
2 changes: 2 additions & 0 deletions src/firejail/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ static void clean_supplementary_groups(gid_t gid) {
if (!arg_nosound) {
copy_group_ifcont("audio", groups, ngroups,
new_groups, &new_ngroups, MAX_GROUPS);
copy_group_ifcont("pipewire", groups, ngroups,
new_groups, &new_ngroups, MAX_GROUPS);
}

if (!arg_novideo) {
Expand Down

0 comments on commit a1597e8

Please sign in to comment.