summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-02-24 08:35:31 +0100
committerJürg Billeter <j@bitron.ch>2018-02-24 10:38:39 +0100
commitbd05e2e64a152fca736b3abf876ae31247d7241b (patch)
tree1d737d36657c3504086ffaa4ce3d1d0b40cab3fe
parentb696d36386b3ec0a57d1eda72449d4bcee2bd227 (diff)
downloadbuildstream-bd05e2e64a152fca736b3abf876ae31247d7241b.tar.gz
sandbox/_sandboxbwrap.py: Unshare UTS namespace in build sandbox
Set hostname to buildstream in build sandbox to reduce host contamination.
-rw-r--r--buildstream/sandbox/_sandboxbwrap.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index cab178f0f..5bc2edc0c 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -93,6 +93,7 @@ class SandboxBwrap(Sandbox):
if not flags & SandboxFlags.NETWORK_ENABLED:
bwrap_command += ['--unshare-net']
+ bwrap_command += ['--unshare-uts', '--hostname', 'buildstream']
if cwd is not None:
bwrap_command += ['--chdir', cwd]