Skip to content

Commit f6baeaf

Browse files
authored
Merge pull request #17 from desultory/dev
run chdir("/") after chroot
2 parents 308025b + 9cbf97f commit f6baeaf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "zenlib"
7-
version = "3.1.5"
7+
version = "3.1.6"
88
authors = [
99
{ name="Desultory", email="[email protected]" },
1010
]

src/zenlib/namespace/namespace_process.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from multiprocessing import Event, Pipe, Process, Queue
2-
from os import chroot, getgid, getlogin, getuid, setgid, setuid
2+
from os import chroot, chdir, getgid, getlogin, getuid, setgid, setuid
33

44
from .namespace import get_id_map, new_id_map, unshare_namespace
55

@@ -37,6 +37,7 @@ def run(self):
3737
setuid(0)
3838
setgid(0)
3939
chroot(self.target_root)
40+
chdir("/")
4041
try:
4142
self.function_queue.put(self._target(*self._args, **self._kwargs))
4243
except Exception as e:

0 commit comments

Comments
 (0)