diff options
author | netblue30 <netblue30@protonmail.com> | 2023-07-10 15:01:50 -0400 |
---|---|---|
committer | netblue30 <netblue30@protonmail.com> | 2023-07-10 15:01:50 -0400 |
commit | b0e47f2e9d46a0ef7c5c0ba52d1064be6ddddb66 (patch) | |
tree | 4a334959eea1e9a5c3338095468dc78db1009248 /src/firejail | |
parent | fix ani-cli.profile (#5892) (diff) | |
download | firejail-b0e47f2e9d46a0ef7c5c0ba52d1064be6ddddb66.tar.gz firejail-b0e47f2e9d46a0ef7c5c0ba52d1064be6ddddb66.tar.zst firejail-b0e47f2e9d46a0ef7c5c0ba52d1064be6ddddb66.zip |
fix random hostname
Diffstat (limited to 'src/firejail')
-rw-r--r-- | src/firejail/fs_hostname.c | 2 | ||||
-rw-r--r-- | src/firejail/sandbox.c | 4 |
2 files changed, 1 insertions, 5 deletions
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) { | |||
152 | // check /etc/hosts file | 152 | // check /etc/hosts file |
153 | struct stat s; | 153 | struct stat s; |
154 | if (stat("/etc/hosts", &s) == -1) | 154 | if (stat("/etc/hosts", &s) == -1) |
155 | goto errexit; | 155 | return; |
156 | // owned by root | 156 | // owned by root |
157 | if (s.st_uid != 0) | 157 | if (s.st_uid != 0) |
158 | goto errexit; | 158 | 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) { | |||
987 | //**************************** | 987 | //**************************** |
988 | // hosts and hostname | 988 | // hosts and hostname |
989 | //**************************** | 989 | //**************************** |
990 | // if (cfg.hostname) | ||
991 | fs_hostname(); | 990 | fs_hostname(); |
992 | 991 | ||
993 | // if (cfg.hosts_file) | ||
994 | // fs_mount_hosts_file(); | ||
995 | |||
996 | //**************************** | 992 | //**************************** |
997 | // /etc overrides from the network namespace | 993 | // /etc overrides from the network namespace |
998 | //**************************** | 994 | //**************************** |