guix-commits
[Top][All Lists]
Advanced

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

02/03: linux-container: Do not jail the container unconditionally.


From: guix-commits
Subject: 02/03: linux-container: Do not jail the container unconditionally.
Date: Wed, 2 Sep 2020 11:09:42 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit 5316dfc0f125b658e4a2acf7f00f49501663d943
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Thu Aug 13 13:59:19 2020 +0200

    linux-container: Do not jail the container unconditionally.
    
    We may want to run a container inside the MNT namespace, without jailing the
    container. If RUN-CONTAINER is passed a null MOUNTS list, do not jail the
    container.
    
    * gnu/build/linux-container.scm (run-container): Do not call
    MOUNT-FILE-SYSTEMS if MOUNTS list is empty.
---
 gnu/build/linux-container.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 87695c9..21292b8 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -243,7 +243,8 @@ that host UIDs (respectively GIDs) map to in the namespace."
              (match (read child)
                ('ready
                 (purify-environment)
-                (when (memq 'mnt namespaces)
+                (when (and (not (null? mounts))
+                           (memq 'mnt namespaces))
                   (catch #t
                     (lambda ()
                       (mount-file-systems root mounts



reply via email to

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