firejail/test/private-etc
Kelvin M. Klann 09329b990f modif: replace --keep-hostname with new --hostname-randomize
Changes:

* Keep hostname by default (same as using `--keep-hostname`)
* Add  `--hostname-randomize` command to randomize the hostname
* Ignore `--keep-hostname` command and print a warning if it is used

Setting a different hostname inside of the sandbox may prevent X11
programs from authenticating to the X server and displaying windows at
all (see #7062).

To avoid breakage, keep the hostname as is by default and only set it to
a random value if a new `hostname-randomize` command is used.

This also avoids potentially surprising behavior, as the user might not
expect the hostname to be changed inside of the sandbox, considering
that usually the protections that are applied firejail involve
restricting access to resources (like file paths), rather than modifying
their values inside of the sandbox.

Fixes #7062

Relates to #7048 #7069.
2026-03-08 02:12:26 -03:00
..
etc-cleanup.exp copyright 2014-2026 all over the place 2025-12-30 08:20:44 -05:00
groups.exp copyright 2014-2026 all over the place 2025-12-30 08:20:44 -05:00
hostname.exp modif: replace --keep-hostname with new --hostname-randomize 2026-03-08 02:12:26 -03:00
hosts-file random hostname by default; fix --hostname and --hosts-file 2023-02-27 17:50:02 -05:00
p1.profile private-etc testing 2023-02-06 22:28:25 -05:00
p2.profile private-etc testing 2023-02-06 22:28:25 -05:00
p3.profile private-etc testing 2023-02-06 22:28:25 -05:00
private-etc.exp copyright 2014-2026 all over the place 2025-12-30 08:20:44 -05:00
private-etc.sh gcov testing 2026-01-16 11:17:29 -05:00
profile.exp copyright 2014-2026 all over the place 2025-12-30 08:20:44 -05:00