Commit graph

7579 commits

Author SHA1 Message Date
Kelvin M. Klann
f43382f1e9 Revert "move whitelist/blacklist to allow/deny"
This reverts commit fe0f975f44.

Note: This only reverts the changes from etc.

The 4 aliases introduced on commit 45f2ba544 are mere, well, aliases.
That is, they fail to address the different usability problems discussed
on [#3447][3447] and in fact only make things more confusing (as has
already been mentioned on [this][4379] and later comments).  The main
reason is that the aliases do not meaningfully map to the original
commands.  For example, the commands from each pair below seem like they
would do the exact same thing:

* `allow` and `nodeny`
* `deny` and `noallow`

Additionally, if these aliases are not the final commands, but only a
test/work-in-progress, then keeping the wide-scale search/replace
changes made on commit fe0f975f4 would only serve to cause confusion, as
users of firejail-git, contributors and downstream projects might start
changing the commands used on their profiles, only to later have to
change them again, potentially to completely different commands.

The sooner this is undone the better, as (besides the above reasons) the
more profile changes there are between the original commit and the
revert, the harder it is to e.g.: `git diff` versions of files across
the following revision ranges: before the commit, after the commit but
before the revert and after the revert.  Note: This is still the case
even if a commit is [ignored by `git blame`][4390].

So let us revert fe0f975f4 and only reapply similar large-scale changes
once we have discussed and settled on better commands.

How the revert was applied: Despite using the auto-generated message
from `git revert`, to ensure correctness and to avoid conflicts the
changes were reverted in different steps: Firstly, revert the files
which can be safely reverted directly ("filestorevert"):

    # Find out which files have been changed on fe0f975f44, but have not
    # been changed afterwards and list them on "filestorevert"
    git show --pretty='' --name-only fe0f975f44 -- etc | LC_ALL=C sort >allfiles
    git diff --name-only fe0f975f44..master -- etc | LC_ALL=C sort >filestoignore
    comm -2 -3 allfiles filestoignore >filestorevert

    # Note: There are 3 extra files on filestoignore because they were
    # added after commit fe0f975f44
    wc -l allfiles filestoignore filestorevert | head -n 3
    #   797 allfiles
    #     8 filestoignore
    #   792 filestorevert

    # Automatically revert files in "filestorevert"
    # See https://stackoverflow.com/a/23401018/10095231
    tr '\n' '\000' <filestorevert | xargs -0 git show fe0f975f44 -- |
    git apply --reverse

    printf 'Total files reverted:\n'
    git diff --name-only | wc -l
    # 792

Secondly, do some search/replace on the rest:

    tr '\n' '\000' <filestoignore | xargs -0 sed -i.bak \
      -e 's/allow  /whitelist /' -e 's/noallow  /nowhitelist /' \
      -e 's/deny  /blacklist /' -e 's/nodeny  /noblacklist /' \
      -e 's/deny-nolog  /blacklist-nolog /'

    find etc -name '*.bak' -print0 | xargs -0 rm

Thirdly, verify the result.  The following command shows the difference
between all the changes in etc from before fe0f975f44 and this commit
(inclusive):

    git diff fe0f975f44~1 -- etc

From the output, it looks like all alias changes are fully reverted and
that the other changes to etc (from after fe0f975f44) remain, so the
revert seems to be done correctly.

[3447]: https://github.com/netblue30/firejail/issues/3447
[4379]: https://github.com/netblue30/firejail/issues/4379#issuecomment-876460222
[4390]: https://github.com/netblue30/firejail/issues/4390
2021-07-18 20:39:14 -03:00
Fred Barclay
42a03511d0 Add MS Edge Beta profile
Profile for Dev channel already exists. Profile for "standard" Edge does
as well but is a redirect to Dev profile

See
b9b65f6ca2

Fixes #4409
2021-07-18 17:41:11 -05:00
rusty-snake
6422a6705f
Merge pull request #4288 from rusty-snake/whitelist-run-common
Create whitelist-run-common.inc
2021-07-16 09:29:36 +00:00
netblue30
599b9af36a Merge branch 'master' of ssh://github.com/netblue30/firejail 2021-07-14 11:29:09 -04:00
netblue30
ba9c9699e7 Removing blacklisted files from top level /etc directory if the filse were blacklisted 2021-07-14 11:28:58 -04:00
smitsohu
ba5f5c8596 tmpfs mounts: also clear MS_REMOUNT flag (#4387) 2021-07-13 22:48:13 +02:00
netblue30
110a74f094 disable-common.inc update 2021-07-13 07:26:05 -04:00
rusty-snake
2bcf83e612 Fix #4396 -- tracelog causes anki to segfault 2021-07-11 14:17:52 +02:00
rusty-snake
e66ba7cc48 Fix file-roller.profile
[skip ci]
2021-07-09 12:58:29 +02:00
rusty-snake
0b31c4110d profcleaner.sh: Change "# CMD" and "#CMD" too
See 00cb8b611f (commitcomment-53262808)
2021-07-09 12:55:40 +02:00
netblue30
00cb8b611f
Merge pull request #4389 from rusty-snake/profcleaner.sh
Create profcleaner.sh
2021-07-08 08:40:19 -05:00
netblue30
665023e00c
Merge pull request #4388 from rusty-snake/allow-deny-zsh
allow/deny in zsh completion
2021-07-08 08:37:54 -05:00
netblue30
3adc44744b
Merge pull request #4390 from rusty-snake/git-blame-ignore-revs
Exclude allow/deny move in profile from git blame
2021-07-08 08:37:17 -05:00
netblue30
d4db5661e4
Merge pull request #4391 from vnepogodin/master
Update Clion profile and Add Clion EAP profile
2021-07-08 08:35:28 -05:00
netblue30
6afe2f77bd
Merge pull request #4392 from rusty-snake/sort-disable-programs.inc
LC_ALL=C sort disable-programs.inc
2021-07-08 08:34:15 -05:00
Vladislav Nepogodin
cbfcf613a5
Sort 2021-07-08 14:17:27 +04:00
Vladislav Nepogodin
b282636489
Add new directories 2021-07-08 13:33:49 +04:00
rusty-snake
5172e3a0aa LC_ALL=C sort disable-programs.inc 2021-07-07 21:41:33 +02:00
Vladislav Nepogodin
3b90a802d9
Revert changes 2021-07-07 22:01:44 +04:00
rusty-snake
1bb3f617d9
profcleaner.sh: Rename --all to --system
[skip ci]
2021-07-07 16:41:37 +00:00
Vladislav Nepogodin
c2f8d4dfd6
Revert changes 2021-07-07 19:37:17 +04:00
Vladislav Nepogodin
d010afe797
Remove unnecessary 2021-07-07 15:20:44 +04:00
Vladislav Nepogodin
3777bd7fb2
Fix clion
Add new clion-eap profile
Fix broken clion profile
2021-07-07 14:37:51 +04:00
rusty-snake
b023b9a6f2 Exclude allow/deny move in profile from git blame
fe0f975f44 (move whitelist/blacklist to
allow/deny) is just a huge rename w/o effects to the profile. Ignoreing
it in git blame to see which commits actually added/changed a
allow/nodeny command.

Configure git to use .git-blame-ignore-revs:

    git config blame.ignoreRevsFile .git-blame-ignore-revs
2021-07-07 12:28:30 +02:00
rusty-snake
1021fb9e5d allow/deny in zsh completion 2021-07-07 12:01:48 +02:00
rusty-snake
ed02ab57b0 Create profcleaner.sh
profcleaner.c is just sed, I was wondering why we need C for that.
2021-07-07 12:00:20 +02:00
netblue30
4438f14f28 allow/deny fbuilder 2021-07-05 13:10:04 -04:00
netblue30
fe0f975f44 move whitelist/blacklist to allow/deny 2021-07-05 07:23:31 -04:00
netblue30
c32924b825 deprecated whitelist=yes/no in /etc/firejail/firejail.config 2021-07-04 08:21:06 -04:00
netblue30
a11707ea27 allow/deny help and man pages 2021-07-03 22:09:20 -04:00
netblue30
45f2ba544e allow/noallow/deny/nodeny aliases for whitelist/nowhitelist/blacklist/noblacklist 2021-07-03 21:06:11 -04:00
netblue30
c08414fdbb deprecated --disable-whitelist at compile time 2021-07-03 19:24:31 -04:00
rusty-snake
0bae164447 wrc: allow cups socket 2021-07-03 12:59:58 +02:00
netblue30
0562ceb658 cleanup for the next development cycle 2021-07-01 08:59:59 -04:00
netblue30
9abc12bf9b
Merge pull request #4365 from lxeiqr/sndio-fix
Fix sndio support
2021-07-01 07:36:50 -05:00
netblue30
8816dd541d rel 0.9.66 is out, moving to 0.9.67 2021-06-29 15:21:54 -04:00
rusty-snake
a67bb37b0d Fix gnome-calendar crashes 2021-06-29 08:45:01 +02:00
netblue30
648af4ecac Merge branch 'master' of ssh://github.com/netblue30/firejail 2021-06-28 13:13:02 -04:00
netblue30
b3ce082430 release 0.9.66 testing 2021-06-28 13:12:42 -04:00
rusty-snake
835dd5f8eb
Fix #4377 -- telegram-desktop 2.8.2 not starting using firejail-git 2021-06-28 15:59:08 +00:00
netblue30
a3397a78d9
Merge pull request #4332 from rusty-snake/bitwarden-electron
Refactor bitwarden as electron redirect
2021-06-28 09:37:37 -05:00
netblue30
17c60578e7 README update 2021-06-27 20:15:02 -04:00
netblue30
fd6d58d425 README update 2021-06-27 20:13:33 -04:00
netblue30
807bf63c80
Merge pull request #4376 from kmk3/gcov-add-nop-functions
gcov: use no-op functions if not enabled
2021-06-27 19:03:32 -05:00
netblue30
e05610190d
Merge pull request #4369 from pirate486743186/rtv
rtv profile correction
2021-06-27 15:25:47 -05:00
Kelvin M. Klann
5106b2ec40 gcov: use no-op functions if not enabled
Instead of wrapping every gcov function call in an ifdef.

Note: The usage of `((void)0)` is based on section 7.2 of the C99
standard (N1256)[1] [2]:

> 7.2 Diagnostics <assert.h>
>
> 1 The header <assert.h> defines the assert macro and refers to another
> macro,
>
>     NDEBUG
>
> which is not defined by <assert.h>. If NDEBUG is defined as a macro
> name at the point in the source file where <assert.h> is included, the
> assert macro is defined simply as
>
>     #define assert(ignore) ((void)0)

See also assert.h(0p) from POSIX.1-2017[3].

Note: This is a continuation of commit b408b20c7 ("gcov: fix build
failure with gcc 11.1.0") / PR #4373.

[1] http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf
[2] https://port70.net/~nsz/c/c99/n1256.html#7.2
[3] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/assert.h.html
2021-06-27 15:23:22 -03:00
netblue30
ed142c62bf
Merge pull request #4375 from smitsohu/kcmp
remove kcmp from seccomp default drop list
2021-06-27 13:11:20 -05:00
netblue30
77e9d0dd89
Merge pull request #4373 from kmk3/gcov-fix-build-gcc11
gcov: fix build failure with gcc 11.1.0
2021-06-27 13:10:53 -05:00
Kelvin M. Klann
98d223da37 gcov: fix indentation 2021-06-27 13:52:34 -03:00
smitsohu
0c2a5e31c6 tweaks 2021-06-26 17:25:14 +02:00