From b0e47f2e9d46a0ef7c5c0ba52d1064be6ddddb66 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 10 Jul 2023 15:01:50 -0400 Subject: fix random hostname --- src/firejail/fs_hostname.c | 2 +- src/firejail/sandbox.c | 4 ---- src/fnettrace/static-ip-map.txt | 1 + 3 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/firejail/fs_hostname.c b/src/firejail/fs_hostname.c index cddf3c903..29f805e1a 100644 --- a/src/firejail/fs_hostname.c +++ b/src/firejail/fs_hostname.c @@ -152,7 +152,7 @@ void fs_mount_hosts_file(void) { // check /etc/hosts file struct stat s; if (stat("/etc/hosts", &s) == -1) - goto errexit; + return; // owned by root if (s.st_uid != 0) goto errexit; diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index 19ac8d9ec..9eb476f16 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c @@ -987,12 +987,8 @@ int sandbox(void* sandbox_arg) { //**************************** // hosts and hostname //**************************** -// if (cfg.hostname) fs_hostname(); -// if (cfg.hosts_file) -// fs_mount_hosts_file(); - //**************************** // /etc overrides from the network namespace //**************************** diff --git a/src/fnettrace/static-ip-map.txt b/src/fnettrace/static-ip-map.txt index 92c55d148..2742e71c5 100644 --- a/src/fnettrace/static-ip-map.txt +++ b/src/fnettrace/static-ip-map.txt @@ -359,6 +359,7 @@ 172.105.128.0/23 Linode # Akamai +2.16.0.0/13 Akamai 23.0.0.0/12 Akamai 23.32.0.0/11 Akamai 23.64.0.0/14 Akamai -- cgit v1.2.3-54-g00ecf