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

profiles: mpv: allow lua #3243

Merged
merged 3 commits into from
Feb 24, 2020
Merged

profiles: mpv: allow lua #3243

merged 3 commits into from
Feb 24, 2020

Conversation

glitsj16
Copy link
Collaborator

@glitsj16 glitsj16 commented Feb 24, 2020

On Arch mpv needs access to lua:

$ pacman -Q mpv
mpv 1:0.32.0-1
$ firejail /usr/bin/mpv ~/Downloads/video.mp4
/usr/bin/mpv: error while loading shared libraries: liblua5.2.so.5.2: cannot open shared object file: Permission denied

On a side-note, Python support (enabled in the mpv profile) doesn't seem to be needed, at least not on Arch. Need to check on a Ubuntu machine to confirm.

Copy link
Collaborator

@rusty-snake rusty-snake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mpv has lua and javascript plugins/script and youtube-dl (python) support. That these three interpreters are available in the sandbox is fine.

@@ -4,5 +4,6 @@ include allow-lua.local

noblacklist ${PATH}/lua*
noblacklist /usr/include/lua*
noblacklist /usr/lib/liblua*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the blacklist? grep "/usr/lib/liblua" etc/*.inc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rusty-snake I had that in my disable-interpreters.local and forgot about it. Thanks for the catch!

@glitsj16 glitsj16 merged commit db2bdaa into netblue30:master Feb 24, 2020
@glitsj16 glitsj16 deleted the mpv branch February 24, 2020 17:19
@kmk3 kmk3 changed the title add lua support for mpv profiles: mpv: allow lua Nov 25, 2024
kmk3 added a commit to kmk3/firejail that referenced this pull request Nov 25, 2024
mpv crashes if luajit is blocked:

    $ firejail --quiet --noprofile \
      --include=/etc/firejail/disable-interpreters.inc /usr/bin/mpv
    /usr/bin/mpv: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: Permission denied

So make sure that allow-lua.inc is always included when mpv paths (such
as ~/.config/mpv) are allowed.

Environment: luajit 2.1.1727870382-1, mpv 1:0.39.0-3 on Artix Linux.

Related commits:

* db2bdaa ("add lua support for mpv (netblue30#3243)", 2020-02-24) /
  PR netblue30#3243
* d6a6fb9 ("Allow Lua for mpv in dolphin.profile", 2020-04-18) /
  issue netblue30#3363
* f3585e5 ("fixes, closes, enhances, improvements, and so on",
  2020-11-09) /
  issue netblue30#3686
* 3ec523f ("profiles: anki: allow lua", 2024-11-14) /
  PR netblue30#6545
kmk3 added a commit that referenced this pull request Nov 29, 2024
mpv crashes if luajit is blocked:

    $ firejail --quiet --noprofile \
      --include=/etc/firejail/disable-interpreters.inc /usr/bin/mpv
    /usr/bin/mpv: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: Permission denied

So make sure that allow-lua.inc is always included when mpv paths (such
as ~/.config/mpv) are allowed.

Environment: luajit 2.1.1727870382-1, mpv 1:0.39.0-3 on Artix Linux.

Related commits:

* db2bdaa ("add lua support for mpv (#3243)", 2020-02-24) /
  PR #3243
* d6a6fb9 ("Allow Lua for mpv in dolphin.profile", 2020-04-18) /
  issue #3363
* f3585e5 ("fixes, closes, enhances, improvements, and so on",
  2020-11-09) /
  issue #3686
* 3ec523f ("profiles: anki: allow lua", 2024-11-14) /
  PR #6545
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

Successfully merging this pull request may close these issues.

2 participants