summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-11-29 20:11:40 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2015-11-29 20:11:40 -0500
commitaff66254bd589f330fde33dec90c347aabd6e808 (patch)
tree536e1eb66e94a25133518b8fcd93a057e5a051c9
parentllvm scan (diff)
parentadd 'hostname' command to firejail-profile manpage (diff)
downloadfirejail-aff66254bd589f330fde33dec90c347aabd6e808.tar.gz
firejail-aff66254bd589f330fde33dec90c347aabd6e808.tar.zst
firejail-aff66254bd589f330fde33dec90c347aabd6e808.zip
Merge pull request #177 from avoidr/hostname
add 'hostname' command to profile
-rw-r--r--src/firejail/profile.c6
-rw-r--r--src/man/firejail-profile.txt4
2 files changed, 10 insertions, 0 deletions
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) {
221 exit(1); 221 exit(1);
222 return 0; 222 return 0;
223 } 223 }
224
225 // hostname
226 if (strncmp(ptr, "hostname ", 9) == 0) {
227 cfg.hostname = ptr + 9;
228 return 0;
229 }
224 230
225 // dns 231 // dns
226 if (strncmp(ptr, "dns ", 4) == 0) { 232 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.
280dns address 280dns address
281Set a DNS server for the sandbox. Up to three DNS servers can be defined. 281Set a DNS server for the sandbox. Up to three DNS servers can be defined.
282 282
283.TP
284hostname name
285Set a hostname for the sandbox.
286
283 287
284.SH FILES 288.SH FILES
285/etc/firejail/filename.profile, $HOME/.config/firejail/filename.profile 289/etc/firejail/filename.profile, $HOME/.config/firejail/filename.profile