summaryrefslogtreecommitdiff
path: root/linuxnamespaces
AgeCommit message (Collapse)Author
2024-02-21fix logic error in populate_sysHelmut Grohne
Fixes: 1de72653e0b9 ("add function linuxnamespaces.populate_sys")
2024-02-21improve error handling in linuxnamespaces.populate_devHelmut Grohne
2024-02-21add function linuxnamespaces.populate_sysHelmut Grohne
2024-02-21revoke the false promise that bytes would be convertible to PathHelmut Grohne
pathlib.Path(somebytes) fails. Hence bytes is not actually convertible and should not be included in PathConvertible. Then, we can simplify matters in quite a few places by knowing that the thing we work with is not bytes.
2024-02-16add an async read method to EventFDHelmut Grohne
Adding an async write does not work for values larger than 1, because the fd becomes writable once a value of 1 can be written, but a larger value might still cause EAGAIN putting us into a busy loop. Hitting the limit with writing ones is implausible, so async code can just use the synchronous write method.
2024-02-15MountFlags: support conversion to and from a textual representationHelmut Grohne
The textual representation matches util-linux. Not all flag values can be represented textually.
2024-01-25linuxnamespaces.run_in_fork: use os._exit instead of sys.exitHelmut Grohne
When using sys.exit, we actually raise a SystemExit exception and as a consequence exit all context managers. If a particular context manager pertains only the process at hand, we don't really care, because our process is supposed to vanish. If a context manager changes external state such as tempfile.NamedTemporaryFile, this is very bad and unexpected. We need to ensure that such cleanup is not performed. This also simplifies the test suite that had to emulate this behaviour already as pytest uses a context manager.
2024-01-22provide default for IDAllocation.allocation map arg targetHelmut Grohne
Most frequently, the root user is allocated.
2024-01-19add convenience function unshare_user_idmap_nohelperHelmut Grohne
2024-01-18initial checkinHelmut Grohne