Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

sudo unshare -m bash -c "mount --make-rslave /home ; mount -n --make-rprivate -o bind /tmp/empty /home ; sudo -u $(whoami) firefox -ProfileManager -no-remote"

- creates an empty directory,

- fork the mount table for the new bash process and its children (requires privileges),

- unshare /home (required if / is mounted in shared mode [1]),

- hide /home by mount-binding the empty directory,

- start firefox in unprivilegied mode, without being able to access to user's files.

[1] https://www.kernel.org/doc/Documentation/filesystems/shareds...



Still doesn’t fix X11 access




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: