diff options
Diffstat (limited to 'linuxnamespaces')
-rw-r--r-- | linuxnamespaces/__init__.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/linuxnamespaces/__init__.py b/linuxnamespaces/__init__.py index 43c1bc8..1b4ca07 100644 --- a/linuxnamespaces/__init__.py +++ b/linuxnamespaces/__init__.py @@ -407,7 +407,7 @@ def populate_dev( """ origdev = AtLocation(origroot) / "dev" newdev = AtLocation(newroot) / "dev" - directories = {"pts"} + directories = {"pts", "shm"} files = set() symlinks = { "fd": "/proc/self/fd", @@ -456,6 +456,12 @@ def populate_dev( for fn in directories: (newdev / fn).mkdir() (newdev / fn).chmod(0o755) + mount( + "tmpfs", + newdev / "shm", + "tmpfs", + MountFlags.NOSUID | MountFlags.NODEV, + ) for fn in files: (newdev / fn).mknod(stat.S_IFREG) for fn, target in symlinks.items(): |