summary refs log tree commit diff
path: root/tests/containers.scm
diff options
context:
space:
mode:
authorJelle Licht <jlicht@fsfe.org>2020-09-29 23:25:13 +0200
committerJelle Licht <jlicht@fsfe.org>2020-10-01 12:51:13 +0200
commite74818353882f187e5971b5a3a481f17df883dbe (patch)
treee6d808c3662488a0f9e80eb9b9361324b8bf9f10 /tests/containers.scm
parent7dc19c33fc71e17a1d7ddd4563aa6ffd73d1a2cf (diff)
downloadguix-e74818353882f187e5971b5a3a481f17df883dbe.tar.gz
linux-container: Reset jailed root permissions.
* gnu/build/linux-container.scm (mount-file-systems): Add 'chmod' call.
* tests/containers.scm
("call-with-container, mnt namespace, root permissions"): New test.
Diffstat (limited to 'tests/containers.scm')
-rw-r--r--tests/containers.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/containers.scm b/tests/containers.scm
index 7b63e5c108..608902c41a 100644
--- a/tests/containers.scm
+++ b/tests/containers.scm
@@ -134,6 +134,14 @@
        (primitive-exit 0)))))
 
 (skip-if-unsupported)
+(test-assert "call-with-container, mnt namespace, root permissions"
+  (zero?
+   (call-with-container '()
+     (lambda ()
+       (assert-exit (= #o755 (stat:perms (lstat "/")))))
+     #:namespaces '(user mnt))))
+
+(skip-if-unsupported)
 (test-assert "container-excursion"
   (call-with-temporary-directory
    (lambda (root)