36 lines
891 B
Bash
36 lines
891 B
Bash
#!/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/lib /lib \
|
|
--symlink /usr/bin /bin \
|
|
--symlink /usr/bin /sbin \
|
|
--tmpfs /usr/lib/modules \
|
|
--tmpfs /usr/lib/systemd \
|
|
--proc /proc \
|
|
--dev /dev \
|
|
--bind ~/ ~/ \
|
|
--tmpfs ~/.gnupg \
|
|
--tmpfs ~/.ssh \
|
|
--tmpfs ~/.mutt \
|
|
--tmpfs ~/.mozilla \
|
|
--tmpfs ~/.thunderbird \
|
|
--tmpfs ~/.mail \
|
|
--tmpfs ~/.Mail \
|
|
--tmpfs ~/.claws-mail \
|
|
--tmpfs ~/.config \
|
|
--tmpfs ~/.cache \
|
|
--tmpfs ~/.local \
|
|
--tmpfs ~/.pki \
|
|
--unshare-all \
|
|
--new-session \
|
|
--seccomp 10 \
|
|
10< /usr/local/bin/seccomp_default_filter.bpf \
|
|
/usr/bin/7z "$@"
|
|
)
|