added vlc profile

This commit is contained in:
valoq 2019-10-04 21:04:37 +02:00
parent 73e7bb5bb9
commit 77b57d04d0
No known key found for this signature in database
GPG Key ID: 19F09A0FB865CBD8
1 changed files with 43 additions and 0 deletions

43
profiles/vlc Normal file
View File

@ -0,0 +1,43 @@
#!/usr/bin/env bash
set -euo pipefail
(
exec bwrap \
--ro-bind /usr/bin/ /usr/bin/ \
--ro-bind /usr/share /usr/share \
--ro-bind /usr/lib /usr/lib \
--ro-bind /usr/lib64 /usr/lib64 \
--symlink /usr/lib64 /lib64 \
--symlink /usr/bin /bin \
--tmpfs /usr/lib/modules \
--tmpfs /usr/lib/systemd \
--tmpfs /usr/lib/gcc \
--proc /proc \
--dev-bind /dev /dev \
--ro-bind /tmp/.X11-unix /tmp/.X11-unix \
--ro-bind /etc /etc \
--ro-bind ~/.Xauthority /home/jail/.Xauthority \
--ro-bind ~/.config/vlc /home/jail/.config/vlc \
--ro-bind "${@: -1}" /home/jail/"$(basename "${@: -1}")" \
--chdir /home/jail \
--unsetenv MOZ_PLUGIN_PATH \
--unsetenv XTERM_LOCALE \
--unsetenv TERM \
--unsetenv XTERM_VERSION \
--unsetenv XTERM_SHELL \
--unsetenv DBUS_SESSION_BUS_ADDRESS \
--unsetenv XDG_RUNTIME_DIR \
--unsetenv MAIL \
--setenv HOME /home/jail \
--setenv XAUTHORITY /home/jail/.Xauthority \
--setenv USER nobody \
--setenv LOGNAME nobody \
--unshare-user \
--unshare-pid \
--unshare-net \
--unshare-uts \
--unshare-cgroup \
--new-session \
--seccomp 10 \
10< /usr/local/bin/seccomp_default_filter.bpf \
/usr/bin/vlc "$(basename "${@: -1}")" &>/dev/null
)