From b3a83f1ece4b6c8bfcc2a9875df51142c0e39904 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 9 Sep 2020 09:15:55 +0200 Subject: 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 "/". --- gnu/build/linux-container.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/build') 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 -- cgit v1.2.3