diff options
author | 2022-01-16 08:50:24 -0500 | |
---|---|---|
committer | 2022-01-16 08:50:24 -0500 | |
commit | 657221ec76eda5d63b9216fce8ec492992046a7f (patch) | |
tree | 612d59c17509d1415a76d3c2732cfc9e61204e78 /src | |
parent | RELNOTES: add missing noprinters pr reference (diff) | |
parent | Keep vglusers group unless no3d is used (virtualgl) (diff) | |
download | firejail-657221ec76eda5d63b9216fce8ec492992046a7f.tar.gz firejail-657221ec76eda5d63b9216fce8ec492992046a7f.tar.zst firejail-657221ec76eda5d63b9216fce8ec492992046a7f.zip |
Merge pull request #4851 from kmk3/groups-keep-vglusers
Keep vglusers group unless no3d is used (virtualgl)
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 09e1a1071..8278cb62b 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -3150,13 +3150,18 @@ int main(int argc, char **argv, char **envp) { | |||
3150 | } | 3150 | } |
3151 | } | 3151 | } |
3152 | 3152 | ||
3153 | // add render group | 3153 | // add render/vglusers group |
3154 | if (!arg_no3d) { | 3154 | if (!arg_no3d) { |
3155 | g = get_group_id("render"); | 3155 | g = get_group_id("render"); |
3156 | if (g) { | 3156 | if (g) { |
3157 | sprintf(ptr, "%d %d 1\n", g, g); | 3157 | sprintf(ptr, "%d %d 1\n", g, g); |
3158 | ptr += strlen(ptr); | 3158 | ptr += strlen(ptr); |
3159 | } | 3159 | } |
3160 | g = get_group_id("vglusers"); | ||
3161 | if (g) { | ||
3162 | sprintf(ptr, "%d %d 1\n", g, g); | ||
3163 | ptr += strlen(ptr); | ||
3164 | } | ||
3160 | } | 3165 | } |
3161 | 3166 | ||
3162 | // add lp group | 3167 | // add lp group |
diff --git a/src/firejail/util.c b/src/firejail/util.c index 5b8fd0b0f..79ebfa1dd 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -209,6 +209,8 @@ static void clean_supplementary_groups(gid_t gid) { | |||
209 | if (!arg_no3d) { | 209 | if (!arg_no3d) { |
210 | copy_group_ifcont("render", groups, ngroups, | 210 | copy_group_ifcont("render", groups, ngroups, |
211 | new_groups, &new_ngroups, MAX_GROUPS); | 211 | new_groups, &new_ngroups, MAX_GROUPS); |
212 | copy_group_ifcont("vglusers", groups, ngroups, | ||
213 | new_groups, &new_ngroups, MAX_GROUPS); | ||
212 | } | 214 | } |
213 | 215 | ||
214 | if (!arg_noprinters) { | 216 | if (!arg_noprinters) { |