Skip to content

Relevancy of user separation for sandboxing #125

Answered by rusty-snake
odomingao asked this question in Q&A
Discussion options

You must be logged in to vote

Is it still preferable to run sandboxed programs as their own user if possible, using e.g. sudo or machinectl?

Yes. Users are the privilege separation ground every nix* of the last 40 years is build on.

Not necessarily su(do)/pkexec/systemd/run0/machinectl. Even unprivileged podman can change the uid.

What are some potential pitfalls of not doing so?

Sharing resources and accessing APIs:

  • Files
  • Wayland
  • D-Bus
  • PipeWire
  • Pulseaudio
  • KeePassXC / ssh-agent / gpg-agent
  • ...

Opening access to them removes already 50% of what you win with a different uid. Ideally you run a full sandboxed session for every program.
gnome-shell/mutter were technically good in nested usage. However it is very inco…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@rusty-snake
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by odomingao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants