mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3971] mpv no longer uses user config #2482
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#2482
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 @rieje on GitHub (Feb 11, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3971
Bug and expected behavior
mpv (with firejail) no longer uses user config config.
It should use my mpv config.
No profile and disabling firejail
firejail --noprofile /path/to/programin a terminal?It works as expected, no bug.
Environment
Additional context
This bug is experienced is introduced on firejail-0.9.64.2-1 and also apparent on latest version 0.9.64.4-1. Downgrading back to firejail-0.9.64-2 fixes this bug. I have done no modification of any firejail or mpv settings or setup.
Checklist
https://github.com/netblue30/firejail/issues/1139)OUTPUT OF
firejail --debug PROGRAM. I also have an mpv.local.@ghost commented on GitHub (Feb 11, 2021):
From your debug output (L18):
Our recent code and profiles rely heavily on D-Bus filtering with
xdg-dbus-proxyfor extra protection. I would advise to install it.I'm on Arch Linux too and for me mpv is working as expected when firejailed. But alas, your mpv.local from pastebin.com 404's so it's a bit hard to get eyes on what's exactly happening on your machine.
@ghost commented on GitHub (Feb 11, 2021):
@rusty-snake Maybe we should consider adding a copy of all .local files used by the application when the --debug flag is used. Shouldn't add too much overhead I think and can make the debugging experience a bit more pleasant.
@rusty-snake commented on GitHub (Feb 11, 2021):
... and all profiles/includes in ~/.config/firejail. Although it is still possible to modify the profile in /etc/firejail directly.
@rieje is you configuration stored in the default location (~/.config/mpv) or somewhere else? And is it just mpv configuration such as
tls-verify=yes/hwdec=autoor are (external) scripts involved?f71db5299f/etc/profile-m-z/mpv.profile (L14-L25)@rieje commented on GitHub (Feb 11, 2021):
@glitsj16 I installed xdg-dbus-proxy again and tried, same thing. Here's the OUTPUT with it installed. Here's the added mpv.local.
@rusty-snake Yea, my config is basic at ~/.config/mpv/mpv.conf.
@ghost commented on GitHub (Feb 12, 2021):
Good, the debug log confirms that is working as expected. Keep it installed!
Your pastebin'ed mpv.local is a bit unexpected, there's your problem IMO. Why all the ignores? By ignoring all the whitelist options (and not including whitelist-common.inc) you basically turn the profile in what we call a 'blacklist' profile, which is less secure that the original 'whitelist' profile designed for mpv. That would explain why your mpv config(s) are not respected. I also see you're trying to work around some stuff from disable-exec.inc and disable-shell.inc. The reason why escapes me - please elaborate why you try to do this - but you're not making it easy on yourself by doing it like that in a mpv.local. May I suggest moving your existing mpv.local out of the way and retest with the below mpv.local instead:
@rusty-snake commented on GitHub (Feb 12, 2021):
s/ignore include whitelist-players.inc/ignore include whitelist-player-common.inc/gYour first line causes the second one to be ignored. IIRC it works even w/o
ignore seccompJust more breaktage w/o
ignore include wusc.@rieje commented on GitHub (Feb 12, 2021):
@glitsj16 @rusty-snake Ok, that works so I'll close the issue, thanks. But now I'm no longer able to use a simple script bound to a hotkey. mpv gives the error
Starting subprocess failed: initwhen using the hotkey.For my old mpv.local, from trial and error, I needed those ignores for the script to work properly (not sure if I could be more restrictive with them). If I add them to the new mpv.local, using the hotkey results in
[input] No key binding found for key 'Ctrl+DEL'with script not executing.To be clear, there's no issues with mpv running the script with my old mpv.local on firejail-0.9.64.2.
@ghost commented on GitHub (Feb 13, 2021):
I took a quick look at https://github.com/netblue30/firejail/issues/3635 and came up with a fix that works for me. Try adding one of the below snippets to your mpv.local. The first one should be used when your mpv-testme script resides in ${HOME}/bin and comes with the (unavoidable) side-effect of all scripts in there being executable inside the sandbox:
On the contrary, if you place your mpv-testme in /usr/local/bin you can go with this:
If you wonder why the second option needs mpv-testme to be referenced in private-bin while the first one works without it, join in. That bit escapes me and is just something I noticed during testing.
HTH
@rieje commented on GitHub (Feb 13, 2021):
Works great and I should be able to easily adapt for more scripts in the future, thanks!