diff options
author | 2021-01-09 09:51:41 +1300 | |
---|---|---|
committer | 2021-01-08 20:51:41 +0000 | |
commit | 3203dd23a83fc45924b0b46e1bf204bafa878b33 (patch) | |
tree | 68a46d9fdff2212a45cfea0e76b291e36608dc6d /etc/inc | |
parent | fbuilder: check Yama permissions (diff) | |
download | firejail-3203dd23a83fc45924b0b46e1bf204bafa878b33.tar.gz firejail-3203dd23a83fc45924b0b46e1bf204bafa878b33.tar.zst firejail-3203dd23a83fc45924b0b46e1bf204bafa878b33.zip |
Add profile for npm (#3866)
* Add profile for npm
* Apply suggestions from code review
* Remove redundant blacklisting of Wayland.
* Remove unnecessary noblacklist lines for nodejs.
* Replace absolute paths to .inc files with filenames.
* Remove unneeded dbus whitelisting.
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
* Remove empty line
To keep consistent with other profiles, remove the blank line after the header comment.
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
* Add npm files to add-common-devel
So that our addition of npm paths to disable-programs.inc dose not break IDEs,
we need to unblacklist these same paths in allow-common-devel.inc.
* Remove extra blank line
* Add common whitelist includes to npm profile
* Tighten npm profile
Include disable-exec.inc, but allowing ${HOME}.
* Remove whitelist-common.inc from npm profile
whitelist-common breaks npm, and since we don't know where the user's npm
projects will be, leave the whitelist-common include in a comment with a note
about how to enable it for their setup.
* Fix inverted commands
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
* Fixes for whitelisting
* Add login.defs to npm profile's private-etc
Co-authored-by: Aidan Gauland <aidalgol+git@fastmail.net>
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/allow-common-devel.inc | 4 | ||||
-rw-r--r-- | etc/inc/allow-nodejs.inc | 6 | ||||
-rw-r--r-- | etc/inc/disable-programs.inc | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/allow-common-devel.inc b/etc/inc/allow-common-devel.inc index 7cd087b14..68e91a09b 100644 --- a/etc/inc/allow-common-devel.inc +++ b/etc/inc/allow-common-devel.inc | |||
@@ -25,3 +25,7 @@ noblacklist ${HOME}/.cargo/registry | |||
25 | noblacklist ${HOME}/.cargo/.crates.toml | 25 | noblacklist ${HOME}/.cargo/.crates.toml |
26 | noblacklist ${HOME}/.cargo/.crates2.json | 26 | noblacklist ${HOME}/.cargo/.crates2.json |
27 | noblacklist ${HOME}/.cargo/.package-cache | 27 | noblacklist ${HOME}/.cargo/.package-cache |
28 | |||
29 | # npm | ||
30 | noblacklist ${HOME}/.npm | ||
31 | noblacklist ${HOME}/.npmrc | ||
diff --git a/etc/inc/allow-nodejs.inc b/etc/inc/allow-nodejs.inc new file mode 100644 index 000000000..78a4bed80 --- /dev/null +++ b/etc/inc/allow-nodejs.inc | |||
@@ -0,0 +1,6 @@ | |||
1 | # This file is overwritten during software install. | ||
2 | # Persistent customizations should go in a .local file. | ||
3 | include allow-nodejs.local | ||
4 | |||
5 | noblacklist ${PATH}/node | ||
6 | noblacklist /usr/include/node | ||
diff --git a/etc/inc/disable-programs.inc b/etc/inc/disable-programs.inc index 74d45c4ca..2112c9b4f 100644 --- a/etc/inc/disable-programs.inc +++ b/etc/inc/disable-programs.inc | |||
@@ -760,6 +760,8 @@ blacklist ${HOME}/.neverball | |||
760 | blacklist ${HOME}/.newsbeuter | 760 | blacklist ${HOME}/.newsbeuter |
761 | blacklist ${HOME}/.newsboat | 761 | blacklist ${HOME}/.newsboat |
762 | blacklist ${HOME}/.nicotine | 762 | blacklist ${HOME}/.nicotine |
763 | blacklist ${HOME}/.npm | ||
764 | blacklist ${HOME}/.npmrc | ||
763 | blacklist ${HOME}/.nv | 765 | blacklist ${HOME}/.nv |
764 | blacklist ${HOME}/.nylas-mail | 766 | blacklist ${HOME}/.nylas-mail |
765 | blacklist ${HOME}/.openarena | 767 | blacklist ${HOME}/.openarena |