icedove-uxp-private.bash 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/bash
  2. set -euo pipefail
  3. (exec bwrap \
  4. --proc /proc \
  5. --dev /dev \
  6. --tmpfs /tmp \
  7. --dev-bind /dev/dri /dev/dri \
  8. --ro-bind /etc/fonts /etc/fonts \
  9. --ro-bind /etc/ssl/certs /etc/ssl/certs \
  10. --ro-bind /etc/resolv.conf /etc/resolv.conf \
  11. --ro-bind /lib /lib \
  12. --ro-bind /lib64 /lib64 \
  13. --ro-bind /sys/dev/char /sys/dev/char \
  14. --ro-bind /usr/bin /usr/bin \
  15. --ro-bind /usr/include/fontconfig /usr/include/fontconfig \
  16. --ro-bind /usr/lib /usr/lib \
  17. --ro-bind /usr/lib64 /usr/lib64 \
  18. --ro-bind /usr/share/applications /usr/share/applications \
  19. --ro-bind /usr/share/ca-certificates /usr/share/ca-certificates \
  20. --ro-bind /usr/share/fonts /usr/share/fonts \
  21. --ro-bind /usr/share/glib-2.0 /usr/share/glib-2.0 \
  22. --ro-bind /usr/share/icons /usr/share/icons \
  23. --ro-bind /usr/share/libdrm /usr/share/libdrm \
  24. --ro-bind /usr/share/mime /usr/share/mime \
  25. --ro-bind /usr/share/X11/xkb /usr/share/X11/xkb \
  26. --ro-bind /var/cache/fontconfig /var/cache/fontconfig \
  27. --ro-bind "${HOME}/.Xauthority" "${HOME}/.Xauthority" \
  28. --chdir "${HOME}" \
  29. --unshare-all \
  30. --share-net \
  31. --die-with-parent \
  32. --hostname RESTRICTED \
  33. --setenv SHELL /bin/false \
  34. --setenv PATH /usr/bin \
  35. --file 11 /etc/passwd \
  36. --file 12 /etc/group \
  37. --new-session \
  38. /usr/bin/icedove-uxp) \
  39. 11< <(getent passwd $UID 65534) \
  40. 12< <(getent group "$(id -g)" 65534)
  41. # note: running icedove-uxp on private mode sanbox