mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #4732] [MERGED] Fix keeping certain groups with nogroups #5236
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#5236
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/netblue30/firejail/pull/4732
Author: @kmk3
Created: 12/1/2021
Status: ✅ Merged
Merged: 12/8/2021
Merged by: @netblue30
Base:
master← Head:fix-groups-misc3📝 Commits (3)
28d3091util.c: Rename nogroups to force_nogroups on drop_privsbe5970cFix duplicated fwarning warnings7abce0bFix keeping certain groups with nogroups📊 Changes
5 files changed (+97 additions, -55 deletions)
View changed files
📝
src/firejail/firejail.h(+2 -1)📝
src/firejail/main.c(+49 -47)📝
src/firejail/profile.c(+1 -1)📝
src/firejail/sandbox.c(+1 -1)📝
src/firejail/util.c(+44 -5)📄 Description
This amends commit
b828a9047("Keep audio and video groups regardless ofnogroups", 2021-11-28) from PR #4725.
The commit above did not change the behavior (the groups are still not
kept). With this commit, it appears to work properly:
Add a new check_can_drop_all_groups function to check whether the
supplementary groups can be safely dropped without potentially causing
issues with audio, 3D hardware acceleration or input (and maybe more).
It returns false if nvidia (and no
no3d) is used or if (e)logind isnot running, as in either case the supplementary groups might be needed.
Note: With this, the behavior from before #4725 is restored on (e)logind
systems (when not using nvidia), as it makes the supplementary groups
always be dropped.
Note2: Even with the static variable, these checks still happen at least
once per translation unit (so twice in total per my testing).
This also amends (/kind of reverts) commit
6ddedeba0("Make nogroupswork on nvidia again", 2021-11-29) from PR #4725, as it restores the
nvidia check from it into the new check_can_drop_all_groups function.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.