mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1446] Allow private-dev to accept aditional devices #973
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#973
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?
Originally created by @ghost on GitHub (Aug 9, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1446
Currently
private-devcreate default device whitelist which can't be adjusted. I think it would be good to allow expanding it with additional devices similar as inprivate-binoption. Example:private-dev dvbAbove will allow default
/devwhitelist +/dev/dvb. It will allow addingprivate-devto much more apps which need one or two specific devices. It would be way easier than maintaining app specific device whitelists and more secure than disablingprivate-devaltogether, see https://github.com/netblue30/firejail/pull/1445 . Also this will lose pressure for adding additional devices to default whitelist, see https://github.com/netblue30/firejail/issues/608@smitsohu commented on GitHub (Aug 9, 2017):
I guess that would also allow us to better integrate Yubikey-enabled apps
@SkewedZeppelin commented on GitHub (Aug 9, 2017):
@smitsohu for Yubikey it'd still require whitelisting hidraw*, unless you could filter using vendor id.
@ghost commented on GitHub (Aug 9, 2017):
As I understand
private-dev hidraw*would be enough.@startx2017 commented on GitHub (Aug 9, 2017):
Support for dvb is on mainline, give it a try, I don't have a dvb card.
/dev/dvb will be allowed by default in private-dev.
If it is working, I'll add a --notv command (notv in profile files), similar to novideo and nosound.
@ghost commented on GitHub (Aug 9, 2017):
Isn't better and easier to adjust
private-dev? As I stated above it'll eliminate pressure for adding new devices to default list, which 90% apps doesn't ever need and introducing dozens ofno3d,novideo,notv, no*options which will clutter profiles?@smitsohu commented on GitHub (Aug 9, 2017):
@startx2017 I don't have TV signal in the moment :-) But I can confirm that the DVB device is availabe inside the sandbox, with
private-devenabled.EDITED: From all media players that have Firejail support currently, it seems VLC, MPlayer, Gnome-MPlayer, SMPlayer, Totem, mpv and Kodi are DVB-capable (one could also count Mediathekview, though that is debatable). Which means that an option
notvshould go to all other profiles withprivate-dev.@netblue30 commented on GitHub (Aug 10, 2017):
Thanks @smitsohu!
Let's go for --notv. I'll add it to all profiles after the current round of merges from @SpotComms.
I'm not too worried about cluttering, we'll clean them later. I think we can collapse several of them into something like "service sound,video,tv,3d" the way we did we "protocol inet,inet6,unix..."
@smitsohu commented on GitHub (Aug 10, 2017):
@startx2017 Thanks for fixing!
@ghost commented on GitHub (Aug 10, 2017):
@netblue30
My proposition will look exactly like this without inventing new config options:
private-dev dri,video,dvb...Also this wayprivate-devcan be an universal option which can be added to every profile as tailoring it to problematic app doesn't need further changing code in firejail to expand whitelist then change code again to provide newno*option and so on...I don't see the point of creating many new options which purpose is to blacklist one single file. It weakens
private-devas it's default whitelist is getting bigger and bigger, therefore adding it would involve need to add mostno*options at the same time to counter this effect. I bet many new profile submissions will miss some of those which means that maintainers would have to constantly monitoring and adjusting new profiles.Is there something I miss? Why you are reluctant to adjust
private-devinstead?@netblue30 commented on GitHub (Aug 11, 2017):
It is more than a single file. For example --nosound has some files in /dev and also PulseAudio. For --novideo (videocamera) there are files in /dev and they are already taking about doing something similar to PulseAudio, bringing in daemons and sockets. --notv and --no3d are strictly based on /dev but this can also change. Going forward we can also start integrating them with private-bin and private-lib.
Yes, in the short run we'll clutter the profile files, but we'll clean them at some point and collapse all of them on a single line, something like "service sound,video,tv,etc...", or "subsystem sound,video,tv..." to give it a better name. My feeling is we should target subsystems in the profile files instead of individual files - the files are changing all the time. I am looking now at /dev/dvd and /dev/cdrom - it is quite a mess, no two distributions are the same.
Anyway, we can always go back to managing individual files under /dev as you propose, we already have support for /dev under --whitelist command.