diff options
Diffstat (limited to 'linuxnamespaces/__init__.py')
-rw-r--r-- | linuxnamespaces/__init__.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/linuxnamespaces/__init__.py b/linuxnamespaces/__init__.py index f19503a..a39f43a 100644 --- a/linuxnamespaces/__init__.py +++ b/linuxnamespaces/__init__.py @@ -132,7 +132,7 @@ def bind_mount( srcloc = os.fspath(source) tgtloc = os.fspath(target) except ValueError: - otflags = OpenTreeFlags.OPEN_TREE_CLONE + otflags = OpenTreeFlags.CLONE if recursive: otflags |= OpenTreeFlags.AT_RECURSIVE with open_tree(source, otflags) as srcfd: @@ -218,12 +218,12 @@ def populate_dev( for fn in "null zero full random urandom tty".split(): files.add(fn) bind_mounts[fn] = exitstack.enter_context( - open_tree(origdev / fn, OpenTreeFlags.OPEN_TREE_CLONE) + open_tree(origdev / fn, OpenTreeFlags.CLONE) ) if fuse: files.add("fuse") bind_mounts["fuse"] = exitstack.enter_context( - open_tree(origdev / "fuse", OpenTreeFlags.OPEN_TREE_CLONE) + open_tree(origdev / "fuse", OpenTreeFlags.CLONE) ) if pidns: symlinks["ptmx"] = "pts/ptmx" @@ -231,18 +231,18 @@ def populate_dev( bind_mounts["pts"] = exitstack.enter_context( open_tree( origdev / "pts", - OpenTreeFlags.AT_RECURSIVE | OpenTreeFlags.OPEN_TREE_CLONE, + OpenTreeFlags.AT_RECURSIVE | OpenTreeFlags.CLONE, ) ) files.add("ptmx") bind_mounts["ptmx"] = exitstack.enter_context( - open_tree(origdev / "ptmx", OpenTreeFlags.OPEN_TREE_CLONE) + open_tree(origdev / "ptmx", OpenTreeFlags.CLONE) ) if tun: directories.add("net") files.add("net/tun") bind_mounts["net/tun"] = exitstack.enter_context( - open_tree(origdev / "net/tun", OpenTreeFlags.OPEN_TREE_CLONE) + open_tree(origdev / "net/tun", OpenTreeFlags.CLONE) ) mount( "devtmpfs", @@ -309,7 +309,7 @@ def populate_proc( if namespaces & CloneFlags.NEWNET == CloneFlags.NEWNET: psn = open_tree( newproc / "sys/net", - OpenTreeFlags.OPEN_TREE_CLONE | OpenTreeFlags.AT_RECURSIVE, + OpenTreeFlags.CLONE | OpenTreeFlags.AT_RECURSIVE, ) bind_mount(newproc / "sys", newproc / "sys", True, True) if psn is not None: @@ -365,7 +365,7 @@ def populate_sys( bindfd = exitstack.enter_context( open_tree( AtLocation(origroot) / "sys" / source, - OpenTreeFlags.OPEN_TREE_CLONE | OpenTreeFlags.AT_RECURSIVE, + OpenTreeFlags.CLONE | OpenTreeFlags.AT_RECURSIVE, ), ) if rdonly: |