Skip to content

Commit 08a8c01

Browse files
committed
modif: keep pipewire group unless nosound is used
This group is apparently used on Gentoo[1]. Currently only the "audio" supplementary group is kept. Fixes #5992. See also commit f329386 ("Keep vglusers group unless no3d is used (virtualgl)", 2022-01-07) / PR #4851. [1] https://wiki.gentoo.org/wiki/PipeWire Reported-by: @amano-kenji
1 parent 4b8f1d2 commit 08a8c01

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/firejail/main.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -3217,13 +3217,18 @@ int main(int argc, char **argv, char **envp) {
32173217

32183218
gid_t g;
32193219
if (!arg_nogroups || !check_can_drop_all_groups()) {
3220-
// add audio group
3220+
// add audio groups
32213221
if (!arg_nosound) {
32223222
g = get_group_id("audio");
32233223
if (g) {
32243224
sprintf(ptr, "%d %d 1\n", g, g);
32253225
ptr += strlen(ptr);
32263226
}
3227+
g = get_group_id("pipewire");
3228+
if (g) {
3229+
sprintf(ptr, "%d %d 1\n", g, g);
3230+
ptr += strlen(ptr);
3231+
}
32273232
}
32283233

32293234
// add video group

src/firejail/util.c

+2
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ static void clean_supplementary_groups(gid_t gid) {
207207
if (!arg_nosound) {
208208
copy_group_ifcont("audio", groups, ngroups,
209209
new_groups, &new_ngroups, MAX_GROUPS);
210+
copy_group_ifcont("pipewire", groups, ngroups,
211+
new_groups, &new_ngroups, MAX_GROUPS);
210212
}
211213

212214
if (!arg_novideo) {

0 commit comments

Comments
 (0)