diff options
author | 2023-09-20 15:46:12 +0000 | |
---|---|---|
committer | 2023-09-20 15:46:12 +0000 | |
commit | 27c3e97989ddbfe5b2432004e6514c2995804692 (patch) | |
tree | 78df36707a3602ac98ae2df6e6ebd8f697ad75d7 | |
parent | steam.profile: Allow Factorio (#6012) (diff) | |
parent | modif: keep pipewire group unless nosound is used (diff) | |
download | firejail-27c3e97989ddbfe5b2432004e6514c2995804692.tar.gz firejail-27c3e97989ddbfe5b2432004e6514c2995804692.tar.zst firejail-27c3e97989ddbfe5b2432004e6514c2995804692.zip |
Merge pull request #5993 from kmk3/modif-keep-pipewire-group
modif: keep pipewire group unless nosound is used
-rw-r--r-- | RELNOTES | 1 | ||||
-rw-r--r-- | src/firejail/main.c | 7 | ||||
-rw-r--r-- | src/firejail/util.c | 2 |
3 files changed, 9 insertions, 1 deletions
@@ -21,6 +21,7 @@ firejail (0.9.73) baseline; urgency=low | |||
21 | * modif: Improve --version/--help & print version on startup (#5829) | 21 | * modif: Improve --version/--help & print version on startup (#5829) |
22 | * modif: improve errExit error messages (#5871) | 22 | * modif: improve errExit error messages (#5871) |
23 | * modif: drop deprecated 'shell' option references (#5894) | 23 | * modif: drop deprecated 'shell' option references (#5894) |
24 | * modif: keep pipewire group unless nosound is used (#5992 #5993) | ||
24 | * bugfix: qutebrowser: links will not open in the existing instance (#5601 | 25 | * bugfix: qutebrowser: links will not open in the existing instance (#5601 |
25 | #5618) | 26 | #5618) |
26 | * bugfix: fix --hostname and --hosts-file commands | 27 | * bugfix: fix --hostname and --hosts-file commands |
diff --git a/src/firejail/main.c b/src/firejail/main.c index b0d5dac17..e3dab561c 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -3217,13 +3217,18 @@ int main(int argc, char **argv, char **envp) { | |||
3217 | 3217 | ||
3218 | gid_t g; | 3218 | gid_t g; |
3219 | if (!arg_nogroups || !check_can_drop_all_groups()) { | 3219 | if (!arg_nogroups || !check_can_drop_all_groups()) { |
3220 | // add audio group | 3220 | // add audio groups |
3221 | if (!arg_nosound) { | 3221 | if (!arg_nosound) { |
3222 | g = get_group_id("audio"); | 3222 | g = get_group_id("audio"); |
3223 | if (g) { | 3223 | if (g) { |
3224 | sprintf(ptr, "%d %d 1\n", g, g); | 3224 | sprintf(ptr, "%d %d 1\n", g, g); |
3225 | ptr += strlen(ptr); | 3225 | ptr += strlen(ptr); |
3226 | } | 3226 | } |
3227 | g = get_group_id("pipewire"); | ||
3228 | if (g) { | ||
3229 | sprintf(ptr, "%d %d 1\n", g, g); | ||
3230 | ptr += strlen(ptr); | ||
3231 | } | ||
3227 | } | 3232 | } |
3228 | 3233 | ||
3229 | // add video group | 3234 | // add video group |
diff --git a/src/firejail/util.c b/src/firejail/util.c index 970832b38..bd32181b5 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -207,6 +207,8 @@ static void clean_supplementary_groups(gid_t gid) { | |||
207 | if (!arg_nosound) { | 207 | if (!arg_nosound) { |
208 | copy_group_ifcont("audio", groups, ngroups, | 208 | copy_group_ifcont("audio", groups, ngroups, |
209 | new_groups, &new_ngroups, MAX_GROUPS); | 209 | new_groups, &new_ngroups, MAX_GROUPS); |
210 | copy_group_ifcont("pipewire", groups, ngroups, | ||
211 | new_groups, &new_ngroups, MAX_GROUPS); | ||
210 | } | 212 | } |
211 | 213 | ||
212 | if (!arg_novideo) { | 214 | if (!arg_novideo) { |