multimc: instances not running, because of missing permissions

When starting an instance, in the logs, a failed attempt to load the lwjgl
library is shown and the game doesn't run.
The library is in the /tmp directory. The reason for this appears to
be, in the lwjgl source code, the shared library loading function,
extracts in the temporary directory and continues from there.
This is fixed by whitelisting.

The reason for adding "ignore noexec /tmp" as well, is that without it, the game
can't run, even if the directory is whitelisted. It seems the library needs
to be loaded from /tmp.

A second error for a failed attempt to access /home/user/.cache/JNA is also
shown in the logs. This is also fixed by whitelisting.
This commit is contained in:
powerjungle 2024-02-19 18:04:14 +01:00
parent 092bb0a3d2
commit 1a2e8ab852
No known key found for this signature in database
GPG key ID: 190C37B0F8665DA8

View file

@ -8,11 +8,16 @@ include globals.local
noblacklist ${HOME}/.local/share/multimc
noblacklist ${HOME}/.local/share/multimc5
noblacklist ${HOME}/.multimc5
noblacklist ${HOME}/.cache/JNA
noblacklist /tmp/lwjgl_*
# Ignore noexec on ${HOME} as MultiMC installs LWJGL native
# libraries in ${HOME}/.local/share/multimc
ignore noexec ${HOME}
# Ignore noexec on /tmp as LWJGL extracts libraries to /tmp
ignore noexec /tmp
# Allow java (blacklisted by disable-devel.inc)
include allow-java.inc
@ -25,9 +30,12 @@ include disable-programs.inc
mkdir ${HOME}/.local/share/multimc
mkdir ${HOME}/.local/share/multimc5
mkdir ${HOME}/.multimc5
mkdir ${HOME}/.cache/JNA
whitelist ${HOME}/.local/share/multimc
whitelist ${HOME}/.local/share/multimc5
whitelist ${HOME}/.multimc5
whitelist ${HOME}/.cache/JNA
whitelist /tmp/lwjgl_*
include whitelist-common.inc
caps.drop all
@ -49,4 +57,7 @@ disable-mnt
private-dev
private-tmp
dbus-user none
dbus-system none
#restrict-namespaces