diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-09-20 15:46:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 15:46:12 +0000 |
commit | 27c3e97989ddbfe5b2432004e6514c2995804692 (patch) | |
tree | 78df36707a3602ac98ae2df6e6ebd8f697ad75d7 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 7 | ||||
-rw-r--r-- | src/firejail/util.c | 2 |
2 files changed, 8 insertions, 1 deletions
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) { |