From d205525e1916e8b0fb9cfe95a32794daf514b75f Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sun, 16 Jun 2024 14:06:59 +0200 Subject: examples/userchroot.py: correctly bind mount proc and sys Fixes: be42cb03f861 ("add userchroot.py example") --- examples/userchroot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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(".", ".") -- cgit v1.2.3