--keep-hostname part 3 (#7048)

This commit is contained in:
netblue30 2026-02-08 07:15:25 -05:00
parent 46134f6972
commit ef7f8ee83c
3 changed files with 18 additions and 0 deletions

View file

@ -134,6 +134,7 @@ static const char *const usage_str =
" --keep-dev-shm - /dev/shm directory is untouched (even with --private-dev).\n"
" --keep-dev-tpm - /dev/tpm* devices are untouched (even with --private-dev).\n"
" --keep-fd - inherit open file descriptors to sandbox.\n"
" --keep-hostname - use the current hostname\n"
" --keep-shell-rc - do not copy shell rc files from /etc/skel\n"
" --keep-var-tmp - /var/tmp directory is untouched.\n"
#ifdef HAVE_LANDLOCK

View file

@ -914,6 +914,11 @@ Set a DNS server for the sandbox. Up to three DNS servers can be defined.
\fBhostname name
Set a hostname for the sandbox.
.TP
\fBkeep\-hostname
By default, the hostname is replaced by a random name generated
by firejail at startup. Use this option to disable this feature.
.TP
\fBhosts\-file file
Use file as /etc/hosts.

View file

@ -1313,6 +1313,18 @@ Example:
.br
$ firejail \-\-keep\-fd=3,4,5
.TP
\fB\-\-keep\-hostname
By default, the hostname is replaced by a random name generated by firejail
at startup. Use this option to disable this feature.
.br
.br
Example:
.br
$ firejail \-\-keep\-hostname
.br
.TP
\fB\-\-keep\-shell\-rc
By default, when using a private home directory, firejail copies files from the