From 2d2ca1fd3b27939bbb50a99efd95f00b6d398be7 Mon Sep 17 00:00:00 2001 From: avoidr Date: Sun, 29 Nov 2015 19:47:35 +0100 Subject: [PATCH 1/2] add 'hostname' command to profile --- src/firejail/profile.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) { From 4cf864fe74c3eb3085870229c27faaf743411b77 Mon Sep 17 00:00:00 2001 From: avoidr Date: Sun, 29 Nov 2015 21:14:01 +0100 Subject: [PATCH 2/2] add 'hostname' command to firejail-profile manpage --- src/man/firejail-profile.txt | 4 ++++ 1 file changed, 4 insertions(+) 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