diff options
author | 2015-11-29 20:11:40 -0500 | |
---|---|---|
committer | 2015-11-29 20:11:40 -0500 | |
commit | aff66254bd589f330fde33dec90c347aabd6e808 (patch) | |
tree | 536e1eb66e94a25133518b8fcd93a057e5a051c9 /src | |
parent | llvm scan (diff) | |
parent | add 'hostname' command to firejail-profile manpage (diff) | |
download | firejail-aff66254bd589f330fde33dec90c347aabd6e808.tar.gz firejail-aff66254bd589f330fde33dec90c347aabd6e808.tar.zst firejail-aff66254bd589f330fde33dec90c347aabd6e808.zip |
Merge pull request #177 from avoidr/hostname
add 'hostname' command to profile
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/profile.c | 6 | ||||
-rw-r--r-- | src/man/firejail-profile.txt | 4 |
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. | |||
280 | dns address | 280 | dns address |
281 | Set a DNS server for the sandbox. Up to three DNS servers can be defined. | 281 | Set a DNS server for the sandbox. Up to three DNS servers can be defined. |
282 | 282 | ||
283 | .TP | ||
284 | hostname name | ||
285 | Set 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 |