Commit graph

751 commits

Author SHA1 Message Date
Kelvin M. Klann
0060b5105b
profiles: rename disable-X11.inc to disable-x11.inc (#6294)
That is, make "X11" lowercase so that the order of the includes in the
disable- section remain the same when sorted with `LC_ALL=C`, as is the
case for most of the other sections.  That is also likely to be the
default in text editors (such as in vim on Arch), so this should make
the disable- section more consistent and easier to sort when editing the
profile.

Also, keep the old include as a redirect to the new one for now to avoid
breakage.

Commands used to search and replace:

    git mv etc/inc/disable-X11.inc etc/inc/disable-x11.inc
    git grep -Ilz 'disable-X11' -- etc | xargs -0 \
      perl -pi -e 's/disable-X11/disable-x11/'

Relates to #4462 #4854 #6070 #6289.

This is a follow-up to #6286.
2024-03-27 12:13:47 +00:00
Kelvin M. Klann
0d8fb3d1b4
profiles: sort blacklist sections (#6289)
See etc/templates/profile.template.

This is a follow-up to #6286.
2024-03-27 12:13:21 +00:00
RundownRhino
009212b832
firefox: Add org.kde.kdeconnect to plasma integration comment (#6285)
I recently set up KDE connect and plasma-browser-integration for firefox
(Linux Mint 21.2) and needed this line in addition to the ones mentioned
in the profile. Found it via running `firejail
--profile=/etc/firejail/firefox.profile --dbus-user.log firefox`, trying
to send links to device, and seeing what events get logged.
2024-03-24 11:28:31 +00:00
Kelvin M. Klann
eaee3367d2
Merge pull request #6286 from kmk3/x11-none-improvements
profiles: replace x11 socket blacklist with disable-X11.inc
2024-03-24 06:50:30 +00:00
Kelvin M. Klann
945ad858ed
profiles: deny access to ~/.config/autostart (#6257)
The files in this directory are intended to be automatically executed
when the user logs in.

In which case, granting write access to this directory allows the
program to easily escape the sandbox (by autostarting itself outside of
firejail, for example).

Misc: This was noticed on #6244.
2024-03-24 06:44:22 +00:00
Kelvin M. Klann
04efbb2763 profiles: replace x11 socket blacklist with disable-X11.inc
Replace all occurrences of `blacklist /tmp/.X11-unix` with
`include disable-X11.inc`, which blacklists more X11-related files.

Commands used to search and replace:

    $ git grep -Ilz '^blacklist /tmp/.X11-unix' -- \
      etc/profile*/*.profile | xargs -0 perl -0 -pi -e '\
        s/\nblacklist \/tmp\/.X11-unix\n/\n/; \
        s/(\ninclude disable-xdg.inc\n)/\ninclude disable-X11.inc$1/; \
        s/(\ninclude disable-[^Xx\n]+\n)(\n|# )/$1include disable-X11.inc\n$2/'

Note: The following files were also edited manually:

* etc/profile-a-l/erd.profile
* etc/profile-a-l/links-common.profile
* etc/profile-m-z/termshark.profile
* etc/profile-m-z/tmux.profile
* etc/profile-m-z/tshark.profile

Relates to #4462 #4854.
2024-03-24 03:42:59 -03:00
Kelvin M. Klann
781b57dea8 gconf-editor: remove X11 socket blacklist
It is a GUI program.

It was apparently added by accident on commit 73321c597 ("Fixes
(#2816)", 2019-07-01).

Reported by @glitsj16 at
https://github.com/netblue30/firejail/pull/6286#discussion_r1536618241
2024-03-23 09:08:20 -03:00
Kelvin M. Klann
37724d6b21
k3b.profile: fix dvd drive detection (private-dev) (#6280)
@hedgehog29 commented[1]:

> It prevents k3b from detecting all dvd drives, incudling USB ones, and
> it seems that also SATA.

Fixes #6279.

[1] https://github.com/netblue30/firejail/issues/6279#issue-2191392448
2024-03-23 06:07:18 +00:00
glitsj16
99e9c6abad
New profile: localsend_app.profile (#6244)
Description: An open source cross-platform alternative to AirDrop.

https://github.com/localsend/localsend
2024-03-18 14:30:26 +00:00
glitsj16
f48f55f91b
New profile: editorconfiger.profile (#6235)
Description: Plain tool to validate and compare .editorconfig files.

https://github.com/aegoroff/editorconfiger
https://aur.archlinux.org/packages/editorconfiger
https://aur.archlinux.org/packages/editorconfiger-bin
2024-03-18 10:45:50 +00:00
glitsj16
c334f62e78
New profile: koreader.profile (#6243)
Description: Ebook reader application.

https://koreader.rocks/
2024-03-16 20:26:41 +00:00
glitsj16
8636d32664
New profile: dexios.profile (#6234)
Description: CLI encryption tool

https://github.com/brxken128/dexios
https://aur.archlinux.org/packages/dexios-bin
2024-03-16 20:26:12 +00:00
glitsj16
856890e718
New profile: deadlink.profile (#6233)
Description: Checks and fixes URLs in code and documentation.

https://github.com/nschloe/deadlink
https://aur.archlinux.org/packages/deadlink
2024-03-15 00:04:49 +00:00
glitsj16
259062d952
New profile: cloneit (#6232)
Description: A CLI tool to download specific GitHub directories or
files.

https://github.com/alok8bb/cloneit
https://aur.archlinux.org/packages/cloneit-git
2024-03-15 00:04:13 +00:00
glitsj16
a03e345a86
New profile: lyriek.profile (#6245)
Description: A multi-threaded GTK application to fetch lyrics of
currently playing songs.

https://gitlab.com/bartwillems/lyriek
2024-03-14 18:47:32 +00:00
glitsj16
138a9edb8c
New profile: erd.profile (#6236)
Description: Multi-threaded file-tree visualizer and disk usage
analyzer.

https://github.com/solidiquis/erdtree
https://archlinux.org/packages/extra/x86_64/erdtree/

Note: The repo and package are called `erdtree`, but the executable is
`erd`.
2024-03-14 18:46:27 +00:00
glitsj16
9d01119c1c
New profile: bpftop.profile (#6231)
Description: Dynamic real-time view of running eBPF programs.

https://github.com/Netflix/bpftop
https://aur.archlinux.org/packages/bpftop
https://aur.archlinux.org/packages/bpftop-bin
https://aur.archlinux.org/packages/bpftop-git
2024-03-14 18:44:37 +00:00
Kelvin M. Klann
c16f7a2902
Merge pull request #6261 from kmk3/sort-py-strip-commas
build: sort.py: filter empty and duplicate items
2024-03-08 13:14:22 +00:00
glitsj16
a456e5182c
New profile: green-recoder.profile (#6237)
Simple screen recorder for Linux desktop, supports Wayland & Xorg.

https://github.com/dvershinin/green-recorder
https://aur.archlinux.org/packages/green-recorder
https://aur.archlinux.org/packages/green-recorder-git
2024-03-05 17:20:34 +00:00
glitsj16
06d160fc16
archiver-common: add mkinitcpio support to private-etc (#5656)
mkinitcpio (used to generate initramfs images) supports several
compression formats:
https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/blob/master/mkinitcpio.conf#L54-L64.

On Arch Linux (based distributions) at least this implies the supported
archivers to have access to mkinitcpio-related files under /etc.

This was no problem before 29da82d added `private-etc` to
`archivers-common.profile`.

This adds the now needed extra private-etc items to
archiver-common.profile, for mkinitcpio's supported compressors (which
seem to be at least cpio, gzip and zstd).

Relates to #5610.
2024-03-05 13:56:57 +00:00
glitsj16
5b1bddd652
archivers: drop private-etc now that it's in archiver-common (#5655)
Commit 29da82d added `private-etc` to `archiver-common.profile`.

To avoid doubled options this PR removes it from archiver profiles which
already had it.

Relates to #5610.
2024-03-05 09:19:42 +00:00
glitsj16
0822dd6352
iagno: ordering fixes (#5681) 2024-03-05 09:15:10 +00:00
glitsj16
ea62569ce6
New profiles: lz4 and redirects (#6241) 2024-03-05 08:54:34 +00:00
glitsj16
13da9b9528
gnome-boxes: deny access to /usr/libexec (#6239) 2024-03-05 08:50:50 +00:00
rusty-snake
32688ce86e Add quiet to enchant-2, it has a cli 2024-03-03 16:38:57 +01:00
Kelvin M. Klann
908e5a1a43 build: sort.py: filter empty and duplicate items
Note: This seems to already be done for `protocol` lines.

Before:

    $ ./contrib/sort.py test.profile
    sort.py: checking 1 profile(s)...
    test.profile:1:-private-etc ,,bar,,foo,,bar,,,
    test.profile:1:+private-etc ,,,,,,,bar,bar,foo
    test.profile:2:-protocol ,,unix,,bluetooth,,unix,,inet,,,
    test.profile:2:+protocol unix,inet,bluetooth
    [ Fixed ] test.profile

After:

    $ ./contrib/sort.py test.profile
    sort.py: checking 1 profile(s)...
    test.profile:1:-private-etc ,,bar,,foo,,bar,,,
    test.profile:1:+private-etc bar,foo
    test.profile:2:-protocol ,,unix,,bluetooth,,unix,,inet,,,
    test.profile:2:+protocol unix,inet,bluetooth
    [ Fixed ] test.profile
2024-03-03 10:10:39 -03:00
netblue30
071a5dabb2
Merge pull request #6219 from haplo/ledger-live-desktop
Profile for Ledger Live desktop app
2024-02-29 10:08:48 -05:00
Fidel Ramos
3dc3adc0d7
Profile for ledger-live-desktop
/opt/ledger-live installation currently sits at 345 MiB, so I decided to
whitelist it instead of using private-opt ledger-live, in case future
installations grow in size.

Not using private-dev was the only way I managed to get my USB wallet to
work.
2024-02-28 21:45:35 +00:00
glitsj16
244b96f8f8
Create gnome-boxes.profile 2024-02-27 19:21:17 +00:00
glitsj16
4e2fb28e93
profiles: drop paths already in wusc (#6218)
Drop paths present in etc/inc/whitelist-usr-share-common.inc from
profiles that include it.
2024-02-23 07:11:58 +00:00
glitsj16
44e241261e
electron-cash: use new private-etc syntax 2024-02-19 09:07:55 +00:00
glitsj16
2bca27a10b
Merge pull request #6181 from haplo/electron-cash
Profile for Electron Cash
2024-02-19 09:04:32 +00:00
glitsj16
eded5cc728
Merge pull request #6201 from glitsj16/gnome-keyring-fixes
gnome-keyring: harden and add gnome-keyring-daemon.profile
2024-02-08 13:43:24 +00:00
glitsj16
12ef05da1c Create gnome-keyring-daemon.profile
And use it as the base for the existing gnome-keyring.profile.
2024-02-08 10:20:29 -03:00
glitsj16
c729b03cff gnome-keyring: harden and remove quiet 2024-02-08 10:18:21 -03:00
glitsj16
0aa809d7f6
enchant-lsmod-2: redirect to enchant-2 (#6202) 2024-02-08 06:26:15 +00:00
Fidel Ramos
98d168f3d9
geeqie.profile: allow Lua interpreter (#6183)
Recent versions of geeqie[1] use a Lua interpreter, like the one
currently in Arch Linux (2.2).

Without this fix it fails with:

    /usr/bin/geeqie: error while loading shared libraries: liblua.so.5.4: [...]

[1] https://www.geeqie.org/
2024-02-03 20:24:06 +00:00
luca0N!
ba84566004
crawl.profile: allow lua (#6182)
Add common Lua include to crawl.profile (Dungeon Crawl Stone Soup) to
allow Lua libraries, as both the ncurses and tiles executables are
dynamically linked to Lua.
2024-02-02 03:28:20 +00:00
Fidel Ramos
dae8e69915
electron-cash.profile 2024-01-30 23:36:43 +00:00
pirate486743186
bc47419f4e
profiles: add profiles for gtk youtube viewers symlinks (#6154)
Committer note: For each profile there is both XXX-gtk and gtk-XXX (such
as lbry-viewer-gtk and gtk-lbry-viewer).

XXX-gtk is the symlink
gtk-XXX is the actual file

Co-authored-by: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
2024-01-19 14:31:50 +00:00
pirate486743186
a000f54ea7
lobster.profile: allow basename (#6155)
Co-authored-by: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
2024-01-19 14:21:04 +00:00
Kelvin M. Klann
d35847f9a4
profiles: use only /usr/share/lua* (#6150)
To ensure that it includes luajit paths as well:

* /usr/share/lua
* /usr/share/luajit-2.1

And remove all entries of the same path without the wildcard, to avoid
redundancy.

Misc: The wildcard entries were added on commit 56b60dfd0 ("additional
Lua blacklisting (#3246)", 2020-02-24) and the entries without the
wildcard were partially removed on commit 721a984a5 ("Fix Lua in
disable-interpreters.inc", 2020-02-24).

This is a follow-up to #6128.

Reported-by: @pirate486743186
2024-01-08 11:56:27 +00:00
netblue30
23c42be17d
Merge pull request #6128 from pirate486743186/master
mpv: whitelist /usr/share/mpv
2023-12-21 09:52:19 -05:00
pirate486743186
d0ee85981e mpv: whitelist /usr/share/mpv
Use case: You install scripts in  `/usr/share/mpv` but they remain
inactive. You then symlink them to `/etc/mpv` to activate them if you
want.
2023-12-13 23:29:50 -03:00
Kelvin M. Klann
760f50f78a landlock: move commands into profile and add landlock.enforce
Changes:

* Move commands from --landlock and --landlock.proc= into
  etc/inc/landlock-common.inc
* Remove --landlock and --landlock.proc=
* Add --landlock.enforce

Instead of hard-coding the default commands (and having a separate
command just for /proc), move them into a dedicated profile to make it
easier for users to interact with the entries (view, copy, add ignore
entries, etc).

Only enforce the Landlock commands if --landlock.enforce is supplied.
This allows safely adding Landlock commands to (upstream) profiles while
keeping their enforcement opt-in.  It also makes it simpler to
effectively disable all Landlock commands, by using
`--ignore=landlock.enforce`.

Relates to #6078.
2023-12-11 22:47:11 -03:00
glitsj16
b2850f9f58
curl: add support for ~/.config/curlrc (#6120)
curl supports several locations for the rc file according to its man
page:

[...]
When curl is invoked, it (unless -q, --disable is used) checks for a
default config file and uses it if found, even when -K, --config is
used. The default config file is checked for in the following places in
this order:

1) "$CURL_HOME/.curlrc"
2) "$XDG_CONFIG_HOME/curlrc" (Added in 7.73.0)
3) "$HOME/.curlrc"
[...]
2023-12-11 17:35:35 +00:00
Kelvin M. Klann
4347f06aa9 fractal.profile: allow /usr/share/fractal
This fixes Fractal 5 not opening on Void Linux due to it failing to
access "/usr/share/fractal/resources.gresource".

Fixes #6119.

Reported-by: @mhmdana
Suggested-by: @rusty-snake
2023-12-11 14:26:52 -03:00
Kelvin M. Klann
3dc48e1ab3 lutris.profile: allow mangohud
Similarly to steam.profile (see #4864).

Fixes #6106.
2023-11-27 03:16:18 -03:00
Kelvin M. Klann
7d05a6a2c7 lutris.profile: fix seccomp arguments
I accidentally removed the `!` when sorting the arguments in #6067.

This amends commit fbba03790 ("lutris.profile: allow more syscalls",
2023-10-24) / PR #6067.
2023-11-25 10:07:42 -03:00
netblue30
03e75e5f1d
Merge pull request #6070 from kmk3/sort-py-csort
build: sort.py: use case-sensitive sorting
2023-11-24 17:06:10 -05:00