Merge pull request #177 from avoidr/hostname

add 'hostname' command to profile
This commit is contained in:
netblue30 2015-11-29 20:11:40 -05:00
commit aff66254bd
2 changed files with 10 additions and 0 deletions

View file

@ -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) {

View file

@ -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