Commit graph

339 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
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
Vladislav Nepogodin
b282636489
Add new directories 2021-07-08 13:33:49 +04:00
Vladislav Nepogodin
3b90a802d9
Revert changes 2021-07-07 22:01:44 +04: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
netblue30
fe0f975f44 move whitelist/blacklist to allow/deny 2021-07-05 07:23:31 -04:00
rusty-snake
a67bb37b0d Fix gnome-calendar crashes 2021-06-29 08:45:01 +02: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
rusty-snake
a90428833a
Merge pull request #4368 from alxjsn/master
Address #3872 with changes in pipewire for Firefox and Chromium
2021-06-25 06:57:06 +00:00
glitsj16
db6a0fc7d0
allow access to pkgconfig 2021-06-23 17:48:55 +00:00
Alex Leahu
e943e2f295 Address #3872 with changes for Librewolf 2021-06-22 11:59:46 -05:00
Alex Leahu
04d15e3e06 Address #3872 with changes in pipewire for Firefox and Chromium 2021-06-22 11:39:04 -05:00
pirate486743186
1ca9046cf1
creating alpine.profile (#4350)
* firecfg.config alpine

* Create alpinef.profile

* Create alpine.profile

* disable-programs.inc alpine

* workaround in comment

* Update etc/profile-a-l/alpine.profile

Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>

* deactivating whitelists in ${HOME}

* comment

Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
2021-06-21 12:25:19 +00:00
rusty-snake
bec22bd93e Refactor bitwarden as electron redirect (follow-up) 2021-06-08 12:49:39 +02:00
rusty-snake
5e0628892f Refactor bitwarden as electron redirect 2021-06-08 12:49:39 +02:00
pirate486743186
4a9a05b75c minor fix 2021-06-05 17:18:38 +00:00
pirate486743186
f32b5d9599
creating googler and ddgr profiles (#4333)
* Create googler-common.profile

* Create googler.profile

* Create ddgr.profile

* Update firecfg.config

* sort fix

* space

* space

* tightening

* comment

* fix comment

* fix private-etc and ${DOWNLOADS}

* fix sort

* redundant ${DOWNLOADS}
2021-06-04 20:24:09 +00:00
rusty-snake
ba4e32b38f kodi.profile: Add note for CEC Adapters
closes #4324
2021-06-03 18:14:57 +02:00
pirate486743186
c3c52ef0a6
reorganizing links browsers (#4320)
* Create links-common.profile

* Update links.profile

* Create links2.profile

* Update links.profile

* Update links2.profile

* Update elinks.profile

* Update elinks.profile

* links2

* Update firecfg.config

* Update xlinks.profile

* .xlinks

* add dbus and whitelist-usr-share-common

* .xlinks doesn't exist

* revert

* Create xlinks2

* xlinks2

* Update xlinks2

* Update xlinks.profile

* no wayland

* no wayland

* doesn't use /tmp/.X11-unix

* doesn't use /tmp/.X11-unix

* noblacklist /tmp/.X11-unix

* noblacklist /tmp/.X11-unix
2021-05-31 18:44:46 +00:00
netblue30
567001a826
Merge pull request #4287 from rusty-snake/restrict-usr-libexec
Restrict /usr/libexec
2021-05-29 12:37:33 -05:00
rusty-snake
7ebd2e1401 Fix #3823 -- Unable to start hexchat with firejail 2021-05-29 19:28:37 +02:00
pirate486743186
0d2cabef49
[minor] gunzip profile broken (#4317)
* ignore include disable-shell.inc

* allow-bin-sh.inc
2021-05-29 08:49:24 +00:00
rusty-snake
459a186b22 Restrict /usr/libexec 2021-05-29 09:34:57 +02:00
pirate486743186
0fd1534952
reorganizing youtube-viewers (#4128)
* Create youtube-viewers-common.profile

* reorganising youtube viewers

* rm globals

* reorganise youtube viewers

* adding pipe-viewer

* adding gtk-pipe-viewer

* xterm and youtube-dl cache

* sort

* Update youtube-viewers-common.profile

* quiet

* quiet

* quiet

* Update firecfg.config

* rm vlc

* rm invalid binary

* noinput

* rm whitelist-runuser-common.inc

* rm whitelist-runuser-common.inc

* rm whitelist-runuser-common.inc

* whitelist-runuser-common.inc
2021-05-28 11:52:19 +00:00
glitsj16
395fca8a67
fixes for eb30ce5 (new profiles) (#4291)
* fix blobby

* fix funnyboat

* fix librecad

* drop doubled netfilter entree in blobby

* drop unneeded include in funnyboat
2021-05-20 18:34:24 +00:00
netblue30
eb30ce54e7 new profiles 2021-05-20 08:21:45 -04:00
netblue30
3c11050637
Merge pull request #4283 from RandomVoid/fix_lutris_profile
Fix Lutris profile
2021-05-18 09:50:36 -05:00
rusty-snake
9efbfee6a8 Harden cargo.profile 2021-05-17 09:02:02 +02:00
rusty-snake
538a4c027f Add cargo.profile 2021-05-16 20:23:21 +02:00
RandomVoid
f5a5ba3912 Fix running games with enabled Feral GameMode in Lutris 2021-05-16 19:16:01 +02:00
RandomVoid
6d07ba93fd Fix Lutris won't start without access to ldconfig 2021-05-16 16:51:10 +02:00
sak96
3ff13e6df3 fix: discord logout on opening twice 2021-05-14 06:07:54 +00:00
rusty-snake
ee7b466576 Harden device access in default.profile 2021-05-14 06:07:13 +00:00
glitsj16
9fca4500c4
Follow-up for #4165 (#4271)
* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* Follow-up for #4165

* fix noroot comment

As suggested [here](https://github.com/netblue30/firejail/pull/4271#discussion_r630981737).

* fix dbus-user comment

As suggested [here](https://github.com/netblue30/firejail/pull/4271#discussion_r630982527).

* fix private-dev comment

As suggested [here](https://github.com/netblue30/firejail/pull/4271#discussion_r630980029).

* fix private-etc comment

As suggested [here](https://github.com/netblue30/firejail/pull/4271#discussion_r630979698).

* move writable-var comment cfr. profile.template
2021-05-13 13:48:23 +00:00
rusty-snake
3503abd1c6 Add noinput to browsers as well
Profiles with private-dev behind BROWSER_DISABLE_U2F were missed by 0cee0ba5.
2021-05-13 10:37:27 +02:00
Tad
b0c3dea0f6 Update dino.profile
It now features audio/video calling.
2021-05-11 13:27:21 -04:00
glitsj16
e4beaeaa88
drop noautopulse from agetpkg
It's a workaround option, not to be used in any profile by default. Thanks to @rusty-snake for pointing that out.
2021-05-11 12:51:35 +00:00
rusty-snake
aaec146dd4 Fix bijiben
bijiben crashes without access to /usr/share/tracker3 in Fedora 34 with:

** (bijiben:14): WARNING **: 21:48:08.394: Unable to connect to Tracker: 'file:///usr/share/tracker3/ontologies/nepomuk' is not a ontology location

** (bijiben:14): WARNING **: 21:48:08.394: Cannot initialize BijiManager: 'file:///usr/share/tracker3/ontologies/nepomuk' is not a ontology location
2021-05-08 23:50:00 +02:00
glitsj16
684347c967
revert comment changes from #4257 (#4258)
* revert comment changes from #4257

* revert comment changes from #4257

* revert comment changes from #4257

* revert comment changes from #4257
2021-05-07 17:15:21 +00:00
glitsj16
a8723fd295
read-write fixes (#4257)
* [comment] use 'read-write' instead of 'ignore read-only'

* [comment] use 'read-write' instead of 'ignore read-only'

* [comment] use 'read-write' instead of 'ignore read-only'

* [comment] use 'read-write' instead of 'ignore read-only'
2021-05-07 16:44:41 +00:00
rusty-snake
0cee0ba5a0 Add noinput to all profiles with private-dev 2021-05-05 06:03:18 +00:00
Reiner Herrmann
0b720dd8be profiles: whitelist mozilla (webext) extensions in chromium profile 2021-05-04 19:19:18 +02:00
rusty-snake
28fa17fee4 discord-common.profile: allow webcam
closes #4236

[skip ci]
2021-05-04 13:09:53 +02:00
glitsj16
6a13ff2321
harden audio-recorder (#4233) 2021-05-02 14:23:41 +00:00
glitsj16
4b5f0b9fcb
add comment to firefox.profile (#4232) 2021-05-02 14:23:13 +00:00
rusty-snake
a9c1a56bc2 Harden some game profiles 2021-04-30 10:34:47 +02:00
Neo00001
b5a4035912
Merge pull request #4219 from Neo00001/master
Some minor changes
2021-04-28 15:43:26 +00:00