Commit graph

61 commits

Author SHA1 Message Date
Kelvin M. Klann
ad89817c08
test/fs: deduplicate xdg dirs in macro tests (#7163)
To make it easier to add new directories.

Relates to #7147.
2026-05-13 14:14:31 +00:00
Kelvin M. Klann
fce18b90f3 test/fs/fs.sh: fix typo of "root"
This amends commit 6b7d77c41 ("testing --tmpfs as root and regular
user", 2026-01-21).
2026-05-11 11:09:00 -03:00
Kelvin M. Klann
5abf0577a7
feature: add ${PROJECTS} macro (#7157)
Based on the new ~/Projects directory from version 0.20 of the
xdg-user-dirs specification[1]:

* `XDG_PROJECTS_DIR="$HOME/Projects"`

Relates to #7147 #7151.

[1] https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
2026-05-09 13:19:42 +00:00
Kelvin M. Klann
6b65860e89 test/fs/fs.sh: use one mkdir per directory
To make the diffs clearer.

This amends commit df3f0b618 ("tests: make sure needed directories
exist", 2018-08-15).

Relates to #7147.
2026-05-05 04:38:11 -03:00
Kelvin M. Klann
aff7cb630c feature: allow subpaths in xdg macros
Currently it is not possible to use XDG-related macros (such as
`${DOCUMENTS}`) with subpaths (such as `${DOCUMENTS}/foo`) and so
profiles just use `${HOME}` with a hardcoded path using the English
directory name and the subpath (such as `${HOME}/Documents/foo`).

Allow using subpaths after XDG macros, so that they automatically use
the auto-detected XDG path, just as when currently using the XDG macros
without subpaths.

Before:

    ${HOME}/Documents/foo

After:

    ${DOCUMENTS}/foo

This is a follow-up to #7147.

Closes #2359.

Relates to #4229.
2026-05-01 07:30:23 -03:00
Kelvin M. Klann
217c96fab4 test/fs/fs.sh: move rm of xdg macro files after macro.exp
They are unrelated to private-whitelist.exp.

This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
af26a06dd9 test/fs/fs.sh: sort rm commands for xdg paths
This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
07fe21516a test/fs/fs.sh: fix typo of _firejail_test_file
This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
a4e6495fd1
modif: do not follow symlinks to /dev/null on disable (#7129)
When trying to prevent a file or directory in the user home from being
written to, it is not uncommon to replace it with a symlink to
/dev/null.

If this path is also blacklisted (such as by disable-common.inc), the
symlink will be followed, resulting in /dev/null itself being
blacklisted, which can cause issues with (unrelated) programs that have
their output redirected to /dev/null (for example).

To avoid disabling /dev/null, when applying commands from
`disable_file()` (such as `blacklist` and `read-only`), if a file is a
symlink to /dev/null, avoid following the symlink and perform the
operation on the link itself instead.

Using these commands with "/dev/null" directly as the argument (that is,
without going through a symlink) should still work the same way.

It has been confirmed to work on Linux 3.8[1], so it should work on at
least 3.8 and later.

Closes #5803.

[1] https://github.com/netblue30/firejail/pull/7129#issuecomment-4233141574

Reported-by: @fgpietersz
Suggested-by: @Changaco
Tested-by: @Changaco
Tested-by: @Zopolis4
2026-04-17 18:30:28 +00:00
netblue30
6b7d77c41e testing --tmpfs as root and regular user 2026-01-21 15:48:06 -05:00
netblue30
2f6afc99d5 gcov testing 2026-01-16 11:17:29 -05:00
netblue30
2a5062c800 copyright 2014-2026 all over the place 2025-12-30 08:20:44 -05:00
netblue30
212ac3cb19 update copyright 2025-01-12 19:26:24 -05:00
netblue30
ae8f62dba0 update copyright 2024 2024-01-12 11:23:22 -05:00
David Fetter
2dc16cc247
Update copyright to 2023 (#5664) 2023-02-15 18:57:44 +00:00
netblue30
cb1104edf9 private-etc testing 2023-02-06 22:28:25 -05:00
netblue30
d1124df32d private-etc rework: /etc file groups 2023-01-22 12:03:01 -05:00
netblue30
ac815a4e61 rel 0.9.72 testing: disable whitelisting /dev directory 2023-01-12 12:25:38 -05:00
netblue30
2d0d9a4080 rel 0.9.72 testing: cleanup make test-private-lib 2023-01-12 11:33:47 -05:00
a1346054
7a5c2b205e
tests: use bash-style [[...]] instead of [...] 2022-09-13 22:37:20 +00:00
a1346054
270f0d95e3
tests: stop mixing tabs and spaces 2022-09-13 22:37:20 +00:00
Kelvin M. Klann
92d59b7bdb test/fs: enable private-lib in firejail.config
Before running test/fs/private-lib.exp.

Inspired by the configuration changes that are done on
test/root/checkcfg.exp.

Reason: Since commit 9741d0b60 ("fix disabled private-lib in
/etc/firejail/firejail.config", 2022-06-23), the "build_and_test" job
fails with the following error[1]:

    TESTING: private-lib (test/fs/private-lib.exp)
    spawn /bin/bash
    firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty
    runner@fv-az489-993:~/work/firejail/firejail/test/fs$
    <private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty
    Error: private-lib feature is disabled in Firejail configuration file
    runner@fv-az489-993:~/work/firejail/firejail/test/fs$ TESTING ERROR 1

This fixes CI.

Fixes #5214.

Relates to #5190.

[1] https://github.com/netblue30/firejail/runs/7030862406
2022-06-25 03:14:08 +00:00
netblue30
e6c50240f9 --tab: enable shell tab completion 2022-02-20 08:05:33 -05:00
netblue30
f9d50521f7 small fixes 2022-01-31 09:43:22 -05:00
netblue30
121749f0ca 2022 copyright update 2022-01-07 12:23:47 -05:00
startx2017
b4424d9478 rework make test-fs 2021-07-29 07:47:16 -04:00
startx2017
2609e5cf0b copyright update 2021-02-15 08:33:05 -05:00
netblue30
26ad51d5c9 full ci test 2020-11-08 09:09:45 -05:00
netblue30
88614baf0e mkdir ci testing 2020-11-08 08:31:31 -05:00
glitsj16
6f3867fdb8
move copyright to 2020 (part 2) (#3181)
* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020

* move copyright statement to 2020
2020-01-24 22:46:30 +00:00
smitsohu
b9888e6a38 testing 2019-09-26 10:59:26 +02:00
smitsohu
7be7e2d326 testing: rename and simplify
cf. previous commits 5bb476f74e and 4b1a6094d7
2019-09-26 01:22:59 +02:00
smitsohu
4b1a6094d7 testing 2019-09-25 00:11:05 +02:00
smitsohu
da84323594 testing suite fixes: remove shell localization 2019-09-24 14:17:37 +02:00
smitsohu
5bb476f74e testing 2019-09-24 13:42:19 +02:00
Austin Morton
99a9f8d680 Add private-cwd option to control working directory within jail 2019-05-23 18:45:44 -04:00
smitsohu
0d2f252230 move copyright statement to 2019 2019-02-07 14:58:35 +01:00
Reiner Herrmann
502b05ee28 tests: skip tests checking for /dev/kmsg which might not be available 2018-09-21 18:06:55 +02:00
Reiner Herrmann
94f9fb8496 tests: skip fs_dev_shm.exp if /dev/shm is not writable 2018-08-15 22:27:06 +02:00
Reiner Herrmann
df3f0b618e tests: make sure needed directories exist 2018-08-15 19:31:34 +02:00
netblue30
2155203b3e xdg macro testing 2018-08-07 09:08:21 -04:00
netblue30
2e11e0dbd2 testing 2018-04-04 14:09:09 -04:00
startx2017
da3b7b072b move copyright statement to 2018 2018-01-15 09:46:44 -05:00
netblue30
362d290bac testing 2017-09-05 10:56:40 -04:00
Fred Barclay
997a93efbd
strip trailing whitespace from test/ 2017-05-24 14:38:01 -05:00
netblue30
7fb214324f copyright 2017 2017-02-11 09:56:48 -05:00
netblue30
d3b6581db7 testing and cleanup 2016-11-29 10:04:43 -05:00
netblue30
13ef7fba2b testing 2016-11-20 21:23:10 -05:00
netblue30
f233eee374 testing 2016-11-16 20:11:29 -05:00
netblue30
5c495665ae testing 2016-11-12 08:53:08 -05:00