diff options
author | Helmut Grohne <helmut@subdivi.de> | 2024-06-16 14:06:59 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2024-06-16 14:06:59 +0200 |
commit | d205525e1916e8b0fb9cfe95a32794daf514b75f (patch) | |
tree | 5c0b21cf6f0af339acd35d73e53ea5db68eeb661 | |
parent | 04b195500fffe982891ae3872c8987bdaeec09c0 (diff) | |
download | python-linuxnamespaces-d205525e1916e8b0fb9cfe95a32794daf514b75f.tar.gz |
examples/userchroot.py: correctly bind mount proc and sys
Fixes: be42cb03f861 ("add userchroot.py example")
-rwxr-xr-x | examples/userchroot.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/userchroot.py b/examples/userchroot.py index 9c05c6f..2caea33 100755 --- a/examples/userchroot.py +++ b/examples/userchroot.py @@ -37,8 +37,8 @@ def main() -> None: os.setreuid(0, 0) linuxnamespaces.bind_mount(chrootdir, "/mnt", recursive=True) - linuxnamespaces.bind_mount(chrootdir / "proc", "/proc", recursive=True) - linuxnamespaces.bind_mount(chrootdir / "sys", "/sys", recursive=True) + linuxnamespaces.bind_mount("/proc", "/mnt/proc", recursive=True) + linuxnamespaces.bind_mount("/sys", "/mnt/sys", recursive=True) linuxnamespaces.populate_dev("/", "/mnt", pidns=False) os.chdir("/mnt") linuxnamespaces.pivot_root(".", ".") |