diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 6ac7cbe62..a8eedcaff 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c @@ -221,6 +221,12 @@ int profile_check_line(char *ptr, int lineno) { exit(1); return 0; } + + // hostname + if (strncmp(ptr, "hostname ", 9) == 0) { + cfg.hostname = ptr + 9; + return 0; + } // dns if (strncmp(ptr, "dns ", 4) == 0) { diff --git a/src/man/firejail-profile.txt b/src/man/firejail-profile.txt index 209f847c9..1713b74dd 100644 --- a/src/man/firejail-profile.txt +++ b/src/man/firejail-profile.txt @@ -280,6 +280,10 @@ really need network access. dns address Set a DNS server for the sandbox. Up to three DNS servers can be defined. +.TP +hostname name +Set a hostname for the sandbox. + .SH FILES /etc/firejail/filename.profile, $HOME/.config/firejail/filename.profile