Commit graph

10583 commits

Author SHA1 Message Date
Kelvin M. Klann
bdb8c831e9
tests: man: disable test due to timeout (#6955)
It still timeouts randomly, even with the changes from commit b613c3062
("tests: man: fix timeout error (#6949)", 2025-10-29).

When the test passes, the relevant commands appear to execute in less
than a second.

Log from a successful run of test-network on commit f5d82cc58 ("feature:
add env-max-count / env-max-len to firejail.config (#6951)",
2025-11-01)[1]:

    2025-11-01T13:57:55.6533345Z /usr/bin/man
    2025-11-01T13:57:55.6533649Z TESTING: man
    2025-11-01T13:57:55.6564238Z spawn /bin/bash
    2025-11-01T13:57:57.1602002Z rm -f /tmp/t
    2025-11-01T13:57:57.1612808Z runner@runnervmxu1zt:~/work/firejail/firejail/test/sysutils$ rm -f /tmp/t
    2025-11-01T13:57:57.1613686Z runner@runnervmxu1zt:~/work/firejail/firejail/test/sysutils$
    2025-11-01T13:57:57.1614509Z <st/sysutils$ firejail /usr/bin/man firecfg > /tmp/t
    2025-11-01T13:57:57.1615014Z runner@runnervmxu1zt:~/work/firejail/firejail/test/sysutils$ cat /tmp/t
    2025-11-01T13:57:57.1615466Z FIRECFG(1)                     firecfg man page                     FIRECFG(1)
    2025-11-01T13:57:57.1615727Z
    2025-11-01T13:57:57.1615799Z NAME
    2025-11-01T13:57:57.1616119Z        Firecfg - Desktop integration utility for Firejail software.
    [...]
    2025-11-01T13:57:57.1627646Z OPTIONS
    2025-11-01T13:57:57.1627819Z        --add-users user [user]
    2025-11-01T13:57:57.7620833Z
    2025-11-01T13:57:57.7621314Z all done
    2025-11-01T13:57:57.7621564Z
    2025-11-01T13:57:57.7634133Z /usr/bin/wget
    2025-11-01T13:57:57.7634892Z TESTING: FIXME: wget

Misc: It seems that the last commit to disable a test in this manner was
commit 7e91a0414 ("tests: disable broken wget tests in utils/sysutils",
2023-08-28).

[1] https://github.com/netblue30/firejail/actions/runs/18997725218/job/54259933026
2025-11-03 05:28:49 +00:00
Kelvin M. Klann
f5d82cc58b
feature: add env-max-count / env-max-len to firejail.config (#6951)
Replace the hardcoded `MAX_ENVS` and `MAX_ENV_LEN` limits with new
global configuration options, `env-max-count` and `env-max-len`, which
limit the maximum number of environment variables and the maximum length
of each environment variable (respectively).

Also, include the environment name and value in the "too long
environment variable" error message, similarly to the "too long
argument" error message (see PR #4676 and PR #5677).

This is a follow-up to #6878.

Closes #3678.
2025-11-01 13:56:23 +00:00
dependabot[bot]
f0b8d485b4 build(deps): bump github/codeql-action from 3.30.5 to 4.31.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.5 to 4.31.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3599b3baa1...0499de31b9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 10:52:22 +00:00
Kelvin M. Klann
f6730f554f RELNOTES: add feature, bugfix, test, docs and profile items
Relates to #4633 #6878 #6930 #6937 #6942 #6947 #6948 #6949.
2025-10-30 03:11:46 -03:00
tht2005
d1aeeb4fa1
feature: add arg-max-count and arg-max-len options to firejail.config (#6878)
Replace the hardcoded `MAX_ARGS` and `MAX_ARG_LEN` limits with new
global configuration options, `arg-max-count` and `arg-max-len`, which
limit the maximum number of command-line arguments and the maximum
length of each argument (respectively).

Closes #4633.

Co-authored-by: Kelvin M. Klann <kmk3.code@protonmail.com>
2025-10-30 05:54:31 +00:00
Kelvin M. Klann
b613c30625
tests: man: fix timeout error (#6949)
For a long time there have been intermittent failures in CI when trying
to open the firejail man page with `man`[1]:

    2025-08-05T14:15:03.2742048Z runner@pkrvm76nib4usnx:~/work/firejail/firejail/test/sysutils$ rm -f /tmp/t
    2025-08-05T14:15:03.2742725Z runner@pkrvm76nib4usnx:~/work/firejail/firejail/test/sysutils$
    2025-08-05T14:15:03.2743522Z <ejail/test/sysutils$ firejail man firejail > /tmp/t
    2025-08-05T14:15:03.2743913Z cat /tmp/t
    2025-08-05T14:15:03.5645359Z troff: <standard input>:89: warning [p 2, 2.3i]: cannot adjust line
    2025-08-05T14:15:03.5862718Z troff: <standard input>:3738: warning [p 40, 11.8i]: cannot adjust line
    2025-08-05T14:15:13.5920525Z runner@pkrvm76nib4usnx:~/work/firejail/firejail/test/sysutils$ TESTING ERROR 0

It seems to happen due to a timeout, so use the firecfg man page
instead, as that results in over 10 times less lines in the output and
thus should be less likely to cause issues:

    $ man src/man/firejail.1.in | wc -l
    3057
    $ man src/man/firecfg.1.in | wc -l
    184

Also, use the full path to `man` just in case.

[1] https://github.com/netblue30/firejail/actions/runs/16752574198/job/47426439265
2025-10-29 09:10:44 +00:00
Kelvin M. Klann
9176141d35
profiles: wusc: add /usr/share/gtksourceview-5 (#6947)
Note: We ship a file in this directory since commit 16afd8c8e ("Add
basic gtksourceview language-spec (#5502)", 2022-12-04)

This is a follow-up to #6909.
2025-10-28 16:19:05 +00:00
pierretom
ec6b976f25
bugfix: add missing macros in profile.template (#6948) 2025-10-28 16:13:59 +00:00
pierretom
678d81843f
bugfix: fix French translation for ${PICTURES} macro (#6942)
From /usr/share/locale/fr/LC_MESSAGES/xdg-user-dirs.mo:

    msgid "Pictures"
    msgstr "Images"
2025-10-19 14:46:50 +00:00
sk84
5079daa9cd
profiles: steam: allow ~/.local/share/doublefine (#6937)
Allow the folder that Day of the Tentacle Remastered uses to store save
files. Without adding them in the steam profile, save states don't work
in the game (or it didn't even start, don't remember exactly).

See https://www.pcgamingwiki.com/wiki/Day_of_the_Tentacle_Remastered

Probably it would also allow save games for other games done by
doublefine (https://store.steampowered.com/developer/doublefine), but I
have no other game from them and I have not checked it.
2025-10-19 09:26:35 +00:00
Kelvin M. Klann
ff6fb07132
Merge pull request #6930 from kmk3/docs-clarify-ipc-namespace
docs: man: clarify what ipc-namespace affects
2025-10-10 11:38:46 +00:00
Kelvin M. Klann
2e23c32cc7 docs: man: clarify what ipc-namespace affects
Clarify that even though Unix sockets are an IPC mechanism, IPC
namespaces do not affect them (see ipc_namespaces(7)).

Relates to #6928.

Reported-by: @tupo2
2025-10-09 01:46:44 -03:00
Kelvin M. Klann
4171127fae docs: man: format/sync ipc-namespace descriptions
Relates to #6928.
2025-10-09 01:46:43 -03:00
Kelvin M. Klann
649ad88039 RELNOTES: add profile items
Relates to #6900 #6904 #6907 #6909 #6920 #6923.
2025-10-04 04:17:04 -03:00
Lucas
a2defd1b99
profiles: blink-common-hardened: disable noroot to fix saving files (#6920)
It breaks the file picker, which seems to be using Portals.
2025-10-04 06:55:34 +00:00
t-m-w
4811964e9d
profiles: mullvad-browser: allow readlink and realpath (#6923)
The start-mullvad-browser script uses readlink and realpath when
it is a symlink, so these need to be included as part of private-bin,
or the following error dialog appears, and the browser fails to start:

    start-mullvad-browser cannot be run using a symlink on this operating system.

This problem is observed using Mullvad Browser 14.5.7 as packaged
for Fedora 42.

Repo: https://repository.mullvad.net/rpm/stable/mullvad.repo
Fedora script path: /usr/lib/mullvad-browser/start-mullvad-browser
Upstream: 2f802636b8/projects/browser/RelativeLink/start-browser (L202-207)
2025-10-03 15:52:34 +00:00
dependabot[bot]
f6b666d9d5 build(deps): bump step-security/harden-runner from 2.13.0 to 2.13.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](ec9f2d5744...f4a75cfd61)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 22:48:14 +00:00
dependabot[bot]
fc2ffe73d7 build(deps): bump github/codeql-action from 3.29.11 to 3.30.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.11 to 3.30.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3c3833e0f8...3599b3baa1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 22:43:00 +00:00
Kelvin M. Klann
54d5bb04bc
profiles: wusc: add /usr/share/gtk-4.0 (#6909)
This directory is part of the gtk4 package (version 1:4.20.1-1) on Artix
Linux.

Add it just in case, as wusc already contains the same analogous paths
for gtk2 and gtk3.

This is a follow-up to #6907.
2025-09-26 02:44:58 +00:00
Kelvin M. Klann
3a05a0a53b
profiles: wusc: add /usr/share/glycin-loaders (#6907)
This is apparently needed by glycin/gdk-pixbuf2, which is used by many
programs, such as Firefox and GIMP.

Relates to #6906.

Reported-by: @myrslint
Suggsted-by: @myrslint
2025-09-24 14:09:31 +00:00
Lucas
a942b0bac7
new profile: trivalent (#6900)
https://github.com/secureblue/Trivalent
2025-09-23 01:50:51 +00:00
Spider Jerusalem
3207760728
profiles: godot: allow ~/.local/share/Trash (#6904)
Fixes an error in Godot 4.5 where files cannot be deleted from within
the Editor.
2025-09-22 02:28:09 +00:00
Kelvin M. Klann
d0c89ae819 RELNOTES: add rlimit items
Relates to #6890 #6891 #6893 #6894 #6895.
2025-09-12 07:41:20 -03:00
Kelvin M. Klann
aca3376a77
tests: rlimit: add missing tests for rlimit-as / rlimit-cpu (#6895)
This is a follow-up to #6893.

Relates to #1604.
2025-09-12 10:34:02 +00:00
Kelvin M. Klann
2dbd31618c rlimit: fix suffixes not working
This amends commit 993a9b373 ("modif: rlimit: use uppercase suffixes in
the code/docs (#6891)", 2025-09-07).
2025-09-09 15:34:19 -03:00
Kelvin M. Klann
ad797d7380
docs: rlimit: improve text and use base-2 units (#6894)
The base-2 units are more accurate, as `--rlimit-as=1K` is equivalent to
`--rlimit-as=1024`, not `--rlimit-as=1000`, for example.

This is a follow-up to #6891.

Relates to #4315.
2025-09-09 17:47:30 +00:00
Kelvin M. Klann
45229e0f9b
modif: rlimit: improve error messages (#6893)
Changes:

* Remove unrelated `strerror` output from some error messages
* Remove periods from some error messages
* Ensure that the invalid value is in the error message
* Ensure that the full command name is in the error message (instead of
  just `rlimit` in some cases)
* Standardize output
* tests: Expect the full command name (and argument in some cases)

Examples:

Before:

    $ firejail --quiet --noprofile --rlimit-cpu=-1 /bin/true
    Error: invalid rlimit -1
    $ firejail --quiet --noprofile --rlimit-nproc=-1 /bin/true
    Error: invalid rlimit -1
    $ firejail --quiet --noprofile --rlimit-as=-1 /bin/true
    Error: invalid rlimit-as. Only use positive numbers and K, M or G suffix.: No such file or directory

After:

    $ firejail --quiet --noprofile --rlimit-cpu=-1 /bin/true
    Error: invalid rlimit-cpu: -1
    $ firejail --quiet --noprofile --rlimit-nproc=-1 /bin/true
    Error: invalid rlimit-nproc: -1
    $ firejail --quiet --noprofile --rlimit-as=-1 /bin/true
    Error: invalid rlimit-as: -1; use only positive numbers and K, M or G suffix

This is a follow-up to #6891.

Relates to #4315.
2025-09-09 17:46:52 +00:00
Kelvin M. Klann
af766b4b7d rlimit: sort commands in the code/tests
Note: They are already sorted in the following files:

* contrib/syntax/lists/profile_commands_arg1.list
* src/firejail/usage.c
* src/man/firejail-profile.5.in
* src/man/firejail.1.in
* src/zsh_completion/_firejail.in
* test/environment/rlimit-bad-profile.exp
* test/environment/rlimit-bad.exp

Related commits:

* 137985136 ("Baseline firejail 0.9.28", 2015-08-08)
* caefb7929 ("RLIMIT_AS", 2017-10-13) / PR #1604
* e8685de73 ("implemented --rlimit-cpu - set max CPU time for processes
  running in the sandbox; for issue #1614, more to come...", 2017-10-24)
2025-09-08 12:44:07 -03:00
Kelvin M. Klann
3e4bbc3f21 rlimit: rename test profiles for clarity
Add the specific rlimit command name to the filename.

Commands used to rename the files:

    git mv rlimit-bad1.profile rlimit-bad-fsize.profile
    git mv rlimit-bad2.profile rlimit-bad-nofile.profile
    git mv rlimit-bad3.profile rlimit-bad-nproc.profile
    git mv rlimit-bad4.profile rlimit-bad-sigpending.profile

Added on commit d30ae468d ("testing", 2016-11-19).
2025-09-08 12:44:07 -03:00
Kelvin M. Klann
993a9b373e
modif: rlimit: use uppercase suffixes in the code/docs (#6891)
The proper suffixes (KiB, MiB and GiB) are uppercase.

This is a follow-up to #6890.

Relates to #4315.
2025-09-07 12:01:15 +00:00
Kelvin M. Klann
7f712264ec
modif: rlimit: allow uppercase suffixes (#6890)
For better usability and because the proper suffixes (KiB, MiB and GiB)
are uppercase.

Affected commands:

* `rlimit-as`
* `rlimit-fsize`

Before:

    $ firejail --quiet --noprofile --rlimit-as=100m /bin/true
    $ firejail --quiet --noprofile --rlimit-as=100M /bin/true
    Error: invalid rlimit-as. Only use positive numbers and k, m or g suffix.: No such file or directory

After:

    $ firejail --quiet --noprofile --rlimit-as=100m /bin/true
    $ firejail --quiet --noprofile --rlimit-as=100M /bin/true

Relates to #4315.
2025-09-05 21:22:12 +00:00
Kelvin M. Klann
920917b978 RELNOTES: add profile items
Relates to #6879 #6883 #6884 #6885.
2025-09-04 08:47:12 -03:00
Kelvin M. Klann
498e654db7 RELNOTES: add new profile item
Related commits:

* ae22e5610 ("ne text editor profile", 2025-08-23)
* 04e8ceda5 ("profiles: ne: fix comment and include typos", 2025-09-04)
2025-09-04 08:46:41 -03:00
Kelvin M. Klann
04e8ceda54 profiles: ne: fix comment and include typos
This amends commit ae22e5610 ("ne text editor profile", 2025-08-23).
2025-09-04 08:44:36 -03:00
dependabot[bot]
d3e5ef823a build(deps): bump github/codeql-action from 3.29.7 to 3.29.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.7 to 3.29.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](51f77329af...3c3833e0f8)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 11:34:21 +00:00
dependabot[bot]
b67b2db74e build(deps): bump actions/checkout from 4.2.2 to 5.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 11:33:37 +00:00
Kelvin M. Klann
830d5a94b6
Merge pull request #6885 from kmk3/profiles-organize-blacklists
profiles: organize blacklist sections as per profile.template
2025-09-04 11:33:04 +00:00
Kelvin M. Klann
da5dd4bc0c profiles: organize blacklist sections as per profile.template
On each profile, ensure that the `blacklist` section is right above the
`include disable` section.

See etc/templates/profile.template.

Misc: This appears to affect about a third of the profiles that contain
`blacklist` entries:

    $ git grep -El '^#?blacklist ' -- etc/profile* | wc -l
    158
    $ git diff --name-only f1381b342 | wc -l
    49

Kind of relates to commit 04efbb276 ("profiles: replace x11 socket
blacklist with disable-X11.inc", 2024-03-22) / PR #6286.
2025-09-01 06:53:10 -03:00
Kelvin M. Klann
a45e2016fe profiles: curl/wget: move nvm comments to the top
Optional/commented entries usually go there.

See also the top comments on firefox-common.profile.

Relates to #5058.
2025-08-31 11:06:37 -03:00
Kelvin M. Klann
872b0551f9 profiles: rtv: move rtv-addons comment to the top
Optional/commented entries usually go there.

See also the top comments on firefox-common.profile.

Relates to #4016.
2025-08-31 11:06:29 -03:00
Kelvin M. Klann
f1381b342c profiles: newsbeuter: organize blacklist section
Relates to #4064.
2025-08-31 11:00:41 -03:00
Kelvin M. Klann
0df8e342eb profiles: libreoffice/makepkg: sort gpg comment sections
Related commits:

* d0ae07485 ("makepkg profile for Arch platform, #1642", 2017-11-15)
* e25596bfb ("profiles: libreoffice: support signing documents with GPG
  (#6353)", 2024-05-24)
2025-08-31 11:00:41 -03:00
Kelvin M. Klann
558a7a878a profiles: libreoffice: sort noblacklist section
Related commits:

* 9e3ba319b ("Unify all profiles", 2017-08-07) / #1427.
* eb4b505ac ("Consistent home directory nomenclature", 2017-11-17)
2025-08-31 11:00:41 -03:00
Kelvin M. Klann
8e5171b971
profiles: add missing mailcap entries (#6884)
Allow `~/.mailcap` for the profiles that have `mailcap` in `private-etc`
and vice-versa.

Fixes #6883.

Reported-by: @vinc17fr
Suggested-by: @vinc17fr
2025-08-31 13:59:04 +00:00
Kelvin M. Klann
d789fe44a2 profiles: w3m: sort whitelist section
Added on commit 450d0124f ("Update w3m.profile", 2021-06-07) / PR #4347.
2025-08-30 09:51:58 -03:00
Kelvin M. Klann
c4bd0b9c12 profiles: seamonkey: sort profile
Related commits:

* 63c35052b ("Add '$HOME/.local/share/pki' to blacklist", 2019-02-03)
* 324c73ea4 ("ordering fixes", 2022-01-06) / PR #4830
2025-08-30 07:17:24 -03:00
Kelvin M. Klann
a16c867e7e RELNOTES: format bugfix item
This amends commit 2a3cd30bc ("RELNOTES: add modif, bugfix, build, ci
and profile items", 2025-08-24).

Relates to #6865 #6871.
2025-08-30 06:59:40 -03:00
JustinWayland
8a2cb8ed5d
profiles: qutebrowser: add comment about qute-pass support (#6879) 2025-08-26 11:22:46 +00:00
Kelvin M. Klann
2a3cd30bc4 RELNOTES: add modif, bugfix, build, ci and profile items
Relates to #6856 #6865 #6871 #6872 #6873 #6874 #6875 #6876 #6877.
2025-08-24 15:14:51 -03:00
Kelvin M. Klann
a32cc2f17d profiles: disable-common: sort history section
This amends commit ae22e5610 ("ne text editor profile", 2025-08-23).
2025-08-24 15:12:38 -03:00