aboutsummaryrefslogtreecommitdiff
path: root/gnu
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 /gnu
parent7dc19c33fc71e17a1d7ddd4563aa6ffd73d1a2cf (diff)
downloadguix-e74818353882f187e5971b5a3a481f17df883dbe.tar
guix-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 'gnu')
-rw-r--r--gnu/build/linux-container.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 2d4de788df..4a8bed5a9a 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -170,7 +170,8 @@ for the process."
(pivot-root root put-old)
(chdir "/")
(umount "real-root" MNT_DETACH)
- (rmdir "real-root")))
+ (rmdir "real-root")
+ (chmod "/" #o755)))
(define* (initialize-user-namespace pid host-uids
#:key (guest-uid 0) (guest-gid 0))