allow firefox_t user_home_t : file { read write };
This simply allows your web browser, running as firefox_t to read and write files in your home directory, labeled as user_home_t. sudo unshare -m bash -c "mount --make-rslave / && mount -n -o bind /tmp/empty /home && sudo -u $(whoami) firefox -ProfileManager -no-remote"
it :- forks the mountpoints table for the process to be executed (bash) - it requires capabilities (hence sudo),
- make / as as slave mount in this context (because of systemd which shares the / mountpoint (see: https://www.kernel.org/doc/Documentation/filesystems/shareds...),
- bind an empty directory to /home (that I previously created), it will only be visible for this process and its children, since it's in an unshared mountpoints table,
- I run firefox in user mode.
In Fedora there is an application called sandbox that help you with that
e.g. see http://www.bress.net/blog/archives/195-Firefox-in-a-sandbox-...
The author is mia from the bug and seems to have given up: https://danwalsh.livejournal.com/72697.html
[1]: https://l3net.wordpress.com/2014/09/19/firejail-a-security-s...