Skip to content

Commit fb0729b

Browse files
committed
AppRun: do not mount /tmp RO if will be written
1 parent a2b0105 commit fb0729b

File tree

1 file changed

+4
-1
lines changed
  • data/scripts/Linux-AppImage

1 file changed

+4
-1
lines changed

data/scripts/Linux-AppImage/AppRun

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,11 @@ if [ -n "${ULTRAGRID_USE_FIREJAIL-}" ] && [ "$ULTRAGRID_USE_FIREJAIL" != 0 ] &&
212212
FIREJAIL_OPTS="--profile=$ULTRAGRID_USE_FIREJAIL"
213213
else
214214
FJ_TMPDIR=${TMPDIR-/tmp/ultragrid-$(id -u)}
215-
FIREJAIL_OPTS="--caps.drop=all --ipc-namespace --nonewprivs --noroot --protocol=unix,inet,inet6,netlink --seccomp --shell=none --disable-mnt --private-bin=none --private-opt=none --read-only=/tmp --mkdir=$FJ_TMPDIR --read-write=$FJ_TMPDIR --writable-var"
215+
FIREJAIL_OPTS="--caps.drop=all --ipc-namespace --nonewprivs --noroot --protocol=unix,inet,inet6,netlink --seccomp --shell=none --disable-mnt --private-bin=none --private-opt=none --mkdir=$FJ_TMPDIR --read-write=$FJ_TMPDIR --writable-var"
216216
FIREJAIL_OPTS="$FIREJAIL_OPTS $(get_firejail_whitelist "$@") --private-etc=alsa,group,hostname,ld.so.conf,ld.so.cache,ld.so.conf.d,nsswitch.conf,passwd,resolv.conf --ignore=novideo"
217+
if ! expr "$FIREJAIL_OPTS" : '.*--read-write=/tmp '; then
218+
FIREJAIL_OPTS="$FIREJAIL_OPTS --read-only=/tmp"
219+
fi
217220
fi
218221
if firejail --version | grep -iq "d-\{0,1\}bus.*enabled"; then
219222
FIREJAIL_OPTS="$FIREJAIL_OPTS --dbus-user=none --dbus-system=none"

0 commit comments

Comments
 (0)