guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: build: linux-container: Fix run-container.


From: guix-commits
Subject: 01/02: build: linux-container: Fix run-container.
Date: Thu, 10 Sep 2020 03:39:28 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit b3a83f1ece4b6c8bfcc2a9875df51142c0e39904
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Wed Sep 9 09:15:55 2020 +0200

    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(-)

diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 21292b8..2d4de78 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]