README.sandboxing 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. This document explains some of the sandboxing contributions available for
  2. Ricochet.
  3. Debian GNU/Linux sandboxing:
  4. usr.bin.ricochet-apparmor is a basic AppArmor policy to be installed in
  5. /etc/apparmor.d/; it may be enabled like so:
  6. cp usr.bin.ricochet-apparmor /etc/apparmor.d/usr.bin.ricochet-apparmor
  7. aa-enforce /etc/apparmor.d/usr.bin.ricochet-apparmor
  8. the minijail tool originally from the ChromeOS project is an easy way to
  9. use seccomp as a generic wrapper around any program. We use it to add seccomp
  10. support to ricochet without using the more useful or privileged modes. If
  11. minijail is supported for your platform, congratulations. If not, it may be
  12. built and used like so:
  13. apt-get install libcap-dev
  14. git clone https://chromium.googlesource.com/chromiumos/platform/minijail
  15. export CC=gcc
  16. make
  17. ./minijail0 -h
  18. ricochet-seccomp-amd64.policy is a loose seccomp filter policy to be used
  19. with the minijail tool originally from the ChromeOS project:
  20. minijail0 -n -S ricochet-seccomp-amd64.policy /usr/bin/ricochet
  21. ricochet-seccomp-x86.policy and ricochet-seccomp-arm.policy are the base
  22. policies for the x86 and arm architectures. They may need tweaking before
  23. they are useful. They need testing - only the amd64 code has been used
  24. extensively.
  25. It is also possible to run Ricochet inside of xpra like so:
  26. xpra start :23 --start-child ricochet --exit-with-children \
  27. --no-pulseaudio \
  28. --no-microphone \
  29. --no-sharing \
  30. --no-xsettings \
  31. --no-mdns \
  32. --no-notifications \
  33. --no-bell \
  34. --no-opengl=no \
  35. --no-daemon && xpra attach :23 --no-tray --title=@title@
  36. It is also possible to combine the AppArmor protection as well as the xpra and
  37. minijail commands. This allows for a reasonable start for sandboxing Ricochet
  38. from the host system where it is running on Debian GNU/Linux.