Commit graph

7923 commits

Author SHA1 Message Date
Hank Leininger
b91f03463d
etc/profile-a-l/display.profile: additions needed on Gentoo
Various .so's are needed to allow execution, /etc/ImageMagick-7/ is
needed for various policy XML files, and /usr/$(libdir)/ImageMagick-x.y.z/
is needed in order to have access to decoders.

Tested on Gentoo; I don't know if other distros put the relevant bits
in different paths.

Signed-off-by: Hank Leininger <hlein@korelogic.com>
2021-12-02 21:20:03 -07:00
glitsj16
e3258c2009
Merge pull request #4730 from glitsj16/profstats
profstats cleanup
2021-12-02 14:41:35 +00:00
Kelvin M. Klann
4095003cdd
Merge pull request #4729 from jose1711/goldendict_fix
goldendict: whitelist path to documentation and locales
2021-12-01 21:19:24 +00:00
Jose Riha
d079fa8c00 goldendict: whitelist path to documentation and locales 2021-12-01 18:18:19 -03:00
glitsj16
ebe4c93f27
profstats cleanup 2021-12-01 01:36:33 +00:00
glitsj16
a82c8e0213
Merge pull request #4727 from glitsj16/electron
additional electron blacklists
2021-11-30 16:20:48 +00:00
glitsj16
02fbea0158
move whitelists down according to profile.template 2021-11-30 15:59:39 +00:00
glitsj16
73b508953c
add noblacklists too
As suggested in https://github.com/netblue30/firejail/pull/4727#discussion_r759402234.
2021-11-30 15:43:30 +00:00
glitsj16
87ced03518
additional whitelist paths 2021-11-30 15:26:03 +00:00
glitsj16
d915a8ec30
additional electron blacklists 2021-11-30 15:18:43 +00:00
netblue30
957f55b78c Merge branch 'master' of ssh://github.com/netblue30/firejail 2021-11-30 09:33:50 -05:00
netblue30
e0a083d95a readme updates 2021-11-30 09:33:32 -05:00
netblue30
75bc0f8c5b
Merge pull request #4725 from kmk3/fix-groups-misc2
Keep some groups regardless of nogroups and restore nogroups on nvidia
2021-11-30 14:31:54 +00:00
netblue30
05e0cec771
Merge pull request #4726 from tredondo/patch-9
Add blacklist to disable-programs
2021-11-30 14:30:45 +00:00
netblue30
f91526a6a9 more profstats 2021-11-30 09:28:07 -05:00
netblue30
8f93df99f1 install profstats in /etc/firejail directory - undocumented, used only for development 2021-11-30 08:23:01 -05:00
Ted Robertson
6cf1bdc897
Blacklist ~/.config/monero-project 2021-11-30 01:26:34 -10:00
netblue30
65b37a25d2
Merge pull request #4712 from kmk3/configure-improvements2
Configure improvements2
2021-11-30 01:16:30 +00:00
netblue30
489afd4b8e fix #4714 2021-11-29 20:12:40 -05:00
Kelvin M. Klann
6521341842 etc: Remove comments about nogroups and noroot on nvidia
`nogroups` should not have been causing issues with rendering on nvidia
since commit 623e68216 ("temporary fix for nvidia/nogroups/noroot issue
(#3644, #841)", 2020-10-02) and commit cb460c32c ("more nvidia (#3644)",
2020-10-03), which had made it a no-op on nvidia.  And the handling of
the "render" and "video" groups are independent to the handling of
`nogroups` now; see the previous 3 commits.

Commits which introduced the comments on each profile:

* kodi.profile: commit ce462b6b1 ("fix #3501", 2020-07-16)
* mpsyt.profile: commit e17b48fca ("new profile mpsyt.profile",
  2018-11-28)
* mpv.profile: commit cc7c48983 ("Document #1945", 2018-07-25)
* steam.profile: commit d6f8169dd ("steam fixes; #841, #3267",
  2020-03-15)

Commands used to find the comments:

    git grep -i nvidia -- etc/profile-* | grep -v private-etc

Relates to #4632.
2021-11-29 21:45:43 -03:00
Kelvin M. Klann
6ddedeba01 Make nogroups work on nvidia again
Remove workaround from commit 623e68216 ("temporary fix for
nvidia/nogroups/noroot issue (#3644, #841)", 2020-10-02) and from commit
cb460c32c ("more nvidia (#3644)", 2020-10-03).

The handling of the "render" and "video" groups is separate from
`nogroups` now, so disabling `nogroups` on nvidia shouldn't be necessary
anymore.  See the previous 2 commits for details.

See also the discussion on PR #4632.
2021-11-29 21:42:14 -03:00
Kelvin M. Klann
a72f536122 Keep render, lp, input and other groups regardless of nogroups
Mappings of command -> group that this commit adds:

* no3d -> render
* noprinters -> lp
* nodvd -> cdrom (Debian[1] and Gentoo[2]), optical (Arch[3])
* noinput -> input

Mappings that were considered but that are not added:

* notv -> ? (unknown group)
* nou2f -> ? (devices are apparently owned by root; see #4603)

Based on @rusty-snake's suggestion:
https://github.com/netblue30/firejail/issues/4603#issuecomment-944046299

See the previous commit ("Keep audio and video groups regardless of
nogroups") for details.

Relates to #2042 and #4632.

[1] https://wiki.debian.org/SystemGroups
[2] https://api.gentoo.org/uid-gid.txt
[3] https://wiki.archlinux.org/title/Users_and_groups
2021-11-29 21:42:14 -03:00
Kelvin M. Klann
b828a9047e Keep audio and video groups regardless of nogroups
Currently, on systems that use seat managers that do not implement
seat-based ACLs (such as seatd), sound is broken whenever `nogroups` is
used.  This happens because without ACLs, access to the audio devices in
/dev is controlled by the standard group permissions and the "audio"
group is always dropped when `nogroups` is used.  This patch makes the
"audio" and "video" groups be dropped if and only if `noaudio` and
`novideo` are in effect, respectively (and independently of `nogroups`).
See #4603 and the linked issues/discussions for details.

Note: This is a continuation of commit ea564eb74 ("Consider nosound and
novideo when keeping groups") / PR #4632.

Relates to #2042 and #4531.
2021-11-29 21:42:09 -03:00
netblue30
a63643a5b6 fix: allow tilde (home directory) in --netfilter file name 2021-11-29 17:11:25 -05:00
netblue30
1ad4d8f618 disable shell tab completion for --whitelist and --private commands 2021-11-29 15:42:14 -05:00
Kelvin M. Klann
8344145f25 build: Normalize HAVE_CONTRIB_INSTALL
Added on commit 8d8686af2 ("Make installation of contrib scripts
configurable", 2017-04-13).

Remove redundant argument to AS_IF and make it look more like the other
nearby AS_IF calls.
2021-11-25 11:32:08 -03:00
Kelvin M. Klann
6d42e13a46 build: Normalize HAVE_SUID
See commit 15d793838 ("Try to fix #2310 -- Can't create run directory
without suid-root", 2021-05-13) / PR #4273.

It is the only "HAVE_" option whose value is set by if/else on a
makefile.  Also, it is set in different places to either "yes", "no",
blank or "-DHAVE_SUID".  Set the value only on configure.ac and only to
either blank or to "-DHAVE_SUID".

Misc: The `ifeq ($(HAVE_SUID),-DHAVE_SUID)` comparison that this adds is
based on the existing `ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR)`
comparison on Makefile.in.
2021-11-25 11:32:08 -03:00
Kelvin M. Klann
c84dc09257 configure*: Remove redundant AC_SUBST calls near HAVE_LTS
Added on commit d1acb31c9 ("compile time: enable LTS", 2021-02-28).

It only needs to be called once for each variable.  See the configure
script diff and the previous commit ("configure*: Move AC_SUBST calls to
more obvious places").
2021-11-25 11:32:08 -03:00
Kelvin M. Klann
36058bc54a configure*: Move AC_SUBST calls to more obvious places
These macros should always be called regardless of the intended value of
each variable, as even if e.g.: no --enable-apparmor flag is given, the
configure script still has to substitute `@HAVE_APPARMOR@` with blank in
the relevant files.

Something similar is already being done for HAVE_OVERLAYFS since commit
fb9f2a5fb ("disabled overlayfs, fixes pending; added video channels to
README* files", 2021-02-06).

Note that each AC_SUBST is not immediately converted into search/replace
code when generating the configure script.  It appears that the
variables are handled only after parsing all of configure.ac (or until a
specific command is found), as all arguments passed to every AC_SUBST
call are defined at once on the `ac_subst_vars` list.  The actual
substitutions are also done all at once (while iterating through the
list) and that happens much later in the script (see both occurrences of
`ac_subs_vars` on the current script).
2021-11-25 11:32:07 -03:00
Kelvin M. Klann
221c10177e configure*: Add missing quotes to arguments
For increased safety and consistency.  In addition, this should make it
clearer where each argument starts and ends.

See also the following item from autoconf NEWS[1]:

> * Noteworthy changes in release 2.70 (2020-12-08) [stable]

[...]

> *** Many macros have become pickier about argument quotation.
>
>   If you get a shell syntax error from your generated configure
>   script, or seemingly impossible misbehavior (e.g. entire blocks of
>   the configure script not getting executed), check first that all
>   macro arguments are properly quoted. The “M4 Quotation” section of
>   the manual explains how to quote macro arguments properly.
>
>   It is unfortunately not possible for autoupdate to correct
>   quotation errors.

[1] https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob;f=NEWS;h=ba418d1af5da752de77a2c388f9af56f8f1bf6a4;hb=97fbc5c184acc6fa591ad094eae86917f03459fa
2021-11-25 11:30:25 -03:00
netblue30
483fe0622b disable by default several network tools 2021-11-24 16:46:36 -05:00
Kelvin M. Klann
ef6df15def configure*: Fix wrong quote character in AC_MSG_ERROR
Square brackets are used as quotes in autoconf.

From Section 8.1.1, Active Characters of the Autoconf manual[1]:

> To fully understand where proper quotation is important, you first
> need to know what the special characters are in Autoconf: ‘#’
> introduces a comment inside which no macro expansion is performed, ‘,’
> separates arguments, ‘[’ and ‘]’ are the quotes themselves, ‘(’ and
> ‘)’ (which M4 tries to match by pairs), and finally ‘$’ inside a macro
> definition.

[1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/autoconf.html#Active-Characters
2021-11-24 15:58:51 -03:00
Kelvin M. Klann
b20a1f3ebf configure*: Trim trailing spaces on var assignments
Command used to find them:

    grep ' "$' configure.ac
2021-11-24 15:58:48 -03:00
Kelvin M. Klann
3c6d5232b8 configure.ac: Ensure whitespace after each comma
For increased consistency and readability.

This restores the spaces removed on commit bf81cd6ad ("configure.ac: run
autoupdate to fix autoconf warning") / PR #4316.

Command used to check for the lack of whitespace:

    grep ',[^ ]' configure.ac
2021-11-24 15:58:33 -03:00
netblue30
be66948797 readme update 2021-11-23 11:30:43 -05:00
netblue30
5239eb32a2
Merge pull request #4688 from Bundy01/master
Update firejail-local for Brave + ipfs
2021-11-23 16:29:56 +00:00
netblue30
f976375fa5 cleanup 2021-11-23 08:57:18 -05:00
netblue30
f55e51e482
Merge pull request #4438 from caydey/master
Added `quiet` to some CLI profiles
2021-11-23 13:43:21 +00:00
smitsohu
6acd0d3d9f
Merge pull request #4632 from kmk3/consider-nosound-novideo-groups
Consider nosound and novideo when keeping groups & misc refactors
2021-11-20 15:06:27 +01:00
smitsohu
c477e00ddd testing 2021-11-20 14:06:06 +01:00
Kelvin M. Klann
9abb0a89ae
build: Stop linking pthread (#4695)
Added on commit 137985136 ("Baseline firejail 0.9.28", 2015-08-08).  See
also commit ad6bb83fa ("consolidate makefiles", 2018-03-31).

It is not used anywhere.  And it looks like it has never been used
anywhere:

    $ git log --oneline -Gpthread.h 137985136..master
    $

Issue mentioned by @rusty-snake:
https://github.com/netblue30/firejail/issues/4642#issuecomment-955795463
2021-11-17 18:24:32 +01:00
Kelvin M. Klann
11f3c39970 zsh-comp: update description of machine-id to match --help
This amends commit b5de1d0f9 ("Fix inconsistent descriptions of
machine-id option").

Relates to #4689.
2021-11-15 17:25:16 -03:00
netblue30
9fc5f0cdd6
Merge pull request #4690 from kmk3/docs-fix-machine-id
Fix inconsistent descriptions of machine-id option
2021-11-15 15:17:25 +00:00
Kelvin M. Klann
c374c0c5e7 RELNOTES: mention move of firecfg.config to /etc/firejail/
Relates to #4669.
2021-11-15 03:06:18 -03:00
Kelvin M. Klann
b5de1d0f91 Fix inconsistent descriptions of machine-id option
Some places say that it "preserves" the file and other places say that
it "spoofs" the file.  Based on the fs_machineid function on
src/firejail/fs_etc.c, the latter one is correct.

This amends commit d0cc960c9 ("spoof machine-id", 2016-12-05).

Fixes #4689.

Reported-by: @svc88
2021-11-15 01:19:32 -03:00
Bundy01
fc06f34bc9 Update firejail-local for Brave + ipfs 2021-11-14 22:05:03 +00:00
rusty-snake
e2299b2a41 Profile fixes
- Update RELNOTES and README.md
- disable-common.inc
  - blacklist ${HOME}/.local/share/ibus-typing-booster
  - blacklist /run/timeshift (closes #4660)
- fix audacity.profile (closes #4659)
2021-11-14 16:11:29 +01:00
netblue30
1f6767c906 --ids-check/--ids-init documentation 2021-11-13 09:01:18 -05:00
netblue30
27ae036182 merges 2021-11-13 07:48:36 -05:00
netblue30
499a91ea00 merges 2021-11-13 07:47:06 -05:00