summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-09-09 09:15:55 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-09-10 09:38:52 +0200
commitb3a83f1ece4b6c8bfcc2a9875df51142c0e39904 (patch)
treed962c24d4cd2558c4e46a4d5461343d58ec6f946
parentcc6b1852e15f0c438a5f38bacb7cc8b1916121da (diff)
build: linux-container: Fix run-container.
This is a follow-up of 5316dfc0f125b658e4a2acf7f00f49501663d943. Some users of run-container may expect that the container is jailed, even if there are no mounts. This is the case for some Guix tests. * gnu/build/linux-container.scm (run-container): Do not jail the container when the requested root is "/".
-rw-r--r--gnu/build/linux-container.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 21292b8d2f..2d4de788df 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -243,8 +243,8 @@ that host UIDs (respectively GIDs) map to in the namespace."
(match (read child)
('ready
(purify-environment)
- (when (and (not (null? mounts))
- (memq 'mnt namespaces))
+ (when (and (memq 'mnt namespaces)
+ (not (string=? root "/")))
(catch #t
(lambda ()
(mount-file-systems root mounts