Skip to content

mpv: lua plugins cannot load shared libraries #3554

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

Closed
4 tasks done
hyiltiz opened this issue Jul 27, 2020 · 4 comments
Closed
4 tasks done

mpv: lua plugins cannot load shared libraries #3554

hyiltiz opened this issue Jul 27, 2020 · 4 comments

Comments

@hyiltiz
Copy link

hyiltiz commented Jul 27, 2020

See open-dynaMIX/simple-mpv-webui#106 for more detail.

Bug and expected behavior

  • Please see above link.

No profile or disabling firejail

  • What changed calling firejail --noprofile PROGRAM in a shell? Works.
  • What changed calling the program by path=without firejail (check whereis PROGRAM, firejail --list, stat $programpath)? Works.

Reproduce
Steps to reproduce the behavior:

  1. Run in bash firejail mpv a.mp3
  2. See error ERROR (see above link).
  3. Run /usr/bin/mpv a.mp3 so it works.

Environment

  • Linux distribution and version (ie output of lsb_release -a) See above link.
  • Firejail version (output of firejail --version) exclusive or used git commit (git rev-parse HEAD)
firejail version 0.9.62

Compile time support:
        - AppArmor support is enabled
        - AppImage support is enabled
        - chroot support is enabled
        - file and directory whitelisting support is enabled
        - file transfer support is enabled
        - firetunnel support is enabled
        - networking support is enabled
        - overlayfs support is enabled
        - private-home support is enabled
        - seccomp-bpf support is enabled
        - user namespace support is enabled
        - X11 sandboxing support is enabled
  • What other programs interact with the affected program for the functionality? Mpv and lua libraries.
  • Are these listed in the profile? Mpv profile: https://termbin.com/7cye

Additional context
Other context about the problem like related errors to understand the problem.

Checklist

  • The upstream profile (and redirect profile if exists) have no changes fixing it.
  • The upstream profile exists (find / -name 'firejail' 2>/dev/null/fd firejail to locate profiles ie in /usr/local/etc/firejail/PROGRAM.profile)
  • Programs needed for interaction are listed.
  • Error was checked in search engine and on issue list without success.
debug output
OUTPUT OF `firejail --debug PROGRAM`
This scraps way too much information that are tangential to the issue at hand. Reserving for privacy reasons. 
@rusty-snake
Copy link
Collaborator

Can you try firejail --whitelist=/usr/share/lua /usr/bin/mpv foo.mp3.

@hyiltiz
Copy link
Author

hyiltiz commented Jul 27, 2020

Just tried. Exactly the same error.

@glitsj16
Copy link
Collaborator

@hyiltiz Compared to our current mpv profile, the version from 0.9.62 that you have blacklists Lua (by including disable-interpreters.inc). I think that's the cause of your issues. You can try adding the below in a mpv.local file and retest:

# Allow lua (blacklisted by disable-interpreters.inc)
include allow-lua.inc

whitelist /usr/share/lua
whitelist /usr/share/lua*
whitelist /usr/share/vulkan

@hyiltiz
Copy link
Author

hyiltiz commented Jul 27, 2020

Hmm, pasting that to ~/.config/firejail/mpv.local fixed it, thanks!

@hyiltiz hyiltiz closed this as completed Jul 27, 2020
glitsj16 added a commit that referenced this issue Jul 28, 2020
kmk3 added a commit to kmk3/firejail that referenced this issue Nov 30, 2024
Add missing paths for:

* lua (for mpv)
* mplayer
* mpv
* smplayer
* vlc

Apparently mpv plugins may break without the lua path; see commit
ccff014 ("fix Lua in mpv.profile", 2020-07-28) / issue netblue30#3554.

Command used to search for relevant profiles:

    $ git grep -IE -l '/\.?(s?mplayer|mpv|vlc)' -- etc

This is a follow-up to commit e4ebbfa ("profiles: ensure allow-lua
where mpv is allowed (netblue30#6555)", 2024-11-29).
kmk3 added a commit that referenced this issue Dec 9, 2024
Add missing paths for:

* lua (for mpv)
* mplayer
* mpv
* smplayer
* vlc

Apparently mpv plugins may break without the lua path; see commit
ccff014 ("fix Lua in mpv.profile", 2020-07-28) / issue #3554.

Command used to search for relevant profiles:

    $ git grep -IE -l '/\.?(s?mplayer|mpv|vlc)' -- etc

This is a follow-up to commit e4ebbfa ("profiles: ensure allow-lua
where mpv is allowed (#6555)", 2024-11-29).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants