cros_sdk: enable unique uts namespace
This is more of a proactive measure. It allows code inside the sdk to
set the hostname w/out impacting the env outside the sdk.
This flag is new to linux 2.6.19, but I don't think we're supporting any
kernel version older than that. The SDK already requires linux 2.6.9.
BUG=chromium:363823
TEST=`./buildbot/run_tests` passes
TEST=`cbuildbot chromiumos-sdk` works
Change-Id: I05cdc4529bb1540597aba1e90f420f0f7d6bd860
Reviewed-on: https://chromium-review.googlesource.com/195782
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/cros_sdk.py b/scripts/cros_sdk.py
index eb57131..c8e9280 100644
--- a/scripts/cros_sdk.py
+++ b/scripts/cros_sdk.py
@@ -406,7 +406,7 @@
os.execvp(cmd[0], cmd)
else:
cgroups.Cgroup.InitSystem()
- namespaces.Unshare(namespaces.CLONE_NEWNS)
+ namespaces.Unshare(namespaces.CLONE_NEWNS | namespaces.CLONE_NEWUTS)
def _CreateParser(sdk_latest_version, bootstrap_latest_version):