Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep vglusers group unless no3d is used (virtualgl) #4851

Merged
merged 1 commit into from
Jan 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/firejail/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3150,13 +3150,18 @@ int main(int argc, char **argv, char **envp) {
}
}

// add render group
// add render/vglusers group
if (!arg_no3d) {
g = get_group_id("render");
if (g) {
sprintf(ptr, "%d %d 1\n", g, g);
ptr += strlen(ptr);
}
g = get_group_id("vglusers");
if (g) {
sprintf(ptr, "%d %d 1\n", g, g);
ptr += strlen(ptr);
}
}

// add lp 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 @@ -209,6 +209,8 @@ static void clean_supplementary_groups(gid_t gid) {
if (!arg_no3d) {
copy_group_ifcont("render", groups, ngroups,
new_groups, &new_ngroups, MAX_GROUPS);
copy_group_ifcont("vglusers", groups, ngroups,
new_groups, &new_ngroups, MAX_GROUPS);
}

if (!arg_noprinters) {
Expand Down