summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-06chroottar.py: don't raise NotImplementedError for misuseHelmut Grohne
The mode actually can only have these three distinct literals. While more complex modes can get passed to TarFile.open, they're decomposed there and only of these three is passed to the compressor openers.
2024-05-06syscalls: allow logging of syscallsHelmut Grohne
2024-05-06chroottar.py: implement Tarfile.zstopen for fileobjHelmut Grohne
zstandard.open actually consumes file objects. Hence there is little benefit in not implementing the passing of a fileobj even though we don't use it here.
2024-05-06examples/cgroup.py: use the assigned cgroupHelmut Grohne
Fixes: b0874c6086f1 ("lift the dbus functionality from the cgroup example")
2024-04-23lift the dbus functionality from the cgroup exampleHelmut Grohne
2024-04-19examples/cgroup.py: support jeepney as an alternative to ravelHelmut Grohne
2024-04-19examples/cgroup.py: use asyncio.runHelmut Grohne
2024-04-19examples/cgroup.py: do not fail when ravel is unavailableHelmut Grohne
2024-04-18examples/cgroup.py: we should pass Delegate=trueHelmut Grohne
2024-04-18examples/cgroup.py: extract a context manager waiting for systemd jobsHelmut Grohne
2024-04-04avoid hard coding the soname of the libcHelmut Grohne
Passing None as name also yields libc functions.
2024-04-04add method AtLocation.as_emptypath for cloning a locationHelmut Grohne
2024-04-04add an example for unsharing a PID namespaceHelmut Grohne
2024-04-04add syscall wrapper for prctl(PR_SET_PDEATHSIG, ...)Helmut Grohne
2024-04-04add function populate_procHelmut Grohne
2024-04-04document security implications of populate_* functionsHelmut Grohne
2024-04-03declare pytest-forked dependency that is in use alreadyHelmut Grohne
2024-04-03tests: avoid need for a type annotationHelmut Grohne
mypy wants type annotations for every def. As we only call another function, we may pass it to the decorator directly and shut up mypy.
2024-04-03add basic tests for AtLocationHelmut Grohne
2024-04-03AtLocation.walk: add support for AT_EMPTY_PATHHelmut Grohne
2024-04-03AtLocation.walk: emit nofllow flag when follow_symlinks=FalseHelmut Grohne
2024-04-03AtLocation.readlink: require AT_SYMLINK_NOFOLLOWHelmut Grohne
It does not make sense to read a link after having followed it.
2024-04-02improve AtLocation.join semanticsHelmut Grohne
Also allow joining an AtLocation. When doing that note that any kind of absolute location object (absolute path without fd and any location with an fd) results in just that latter location just like os.path.join returns the latter path when it is absolute. Fixes: 034f732a1af4 ("initial checkin")
2024-04-02a few formatting and typo fixesHelmut Grohne
2024-04-02add documentation regarding resource management of AtLocationsHelmut Grohne
2024-04-02fix logic error in AtLocation.statHelmut Grohne
Fixes: 1c265b6e11c3 ("add os.stat wrapper AtLocation.stat")
2024-03-24AtLocation.mkdir: support optional arguments from pathlibHelmut Grohne
2024-03-22add convenience functions for stat to AtLocationLikeHelmut Grohne
These are the is_* family and exists all from pathlib.Path.
2024-03-22add os.stat wrapper AtLocation.statHelmut Grohne
2024-03-16slightly simplify testsHelmut Grohne
2024-03-16add an asyncio variant of run_in_forkHelmut Grohne
2024-03-14rename AtLocation.symlink to symlink_toHelmut Grohne
This mirrors what was done for pathlib.Path to avoid confusion about argument order.
2024-03-12work around mypy misdetection on bookwormHelmut Grohne
2024-03-11add method AtLocation.is_absoluteHelmut Grohne
This is similar to pathlib.Path.is_absolute.
2024-03-07add AtLocation.rename method wrapping os.renameHelmut Grohne
2024-03-07add AtLocation.link method wrapping os.linkHelmut Grohne
2024-03-03add function for prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, ...)Helmut Grohne
2024-03-03implement repr for AtLocationHelmut Grohne
2024-03-02fix typosJakub Wilk
2024-03-02examples/chroottar.py: make pylint happierHelmut Grohne
2024-03-01add rudimentary prctl syscall wrapperHelmut Grohne
2024-03-01fix read-only bind_mountHelmut Grohne
As we learn from util-linux, MS_RDONLY is ignored on MS_BIND. Rather than remount, just use the new mount API as it doesn't suffer this limitation.
2024-02-25spell checkHelmut Grohne
2024-02-24populate_dev: remove assumption that newdev does not shadow origdevHelmut Grohne
In particular, one can now pass newdev = origdev.
2024-02-23tests: consider that EventFD.aread might not return a futureHelmut Grohne
2024-02-23delete unused importsHelmut Grohne
2024-02-21examples/chrootfuse2fs.py: generalize to allow squashfsHelmut Grohne
2024-02-21pyproject.toml: minimum python versionHelmut Grohne
We rely on PEP 585 and hence, 3.9 is a hard requirement.
2024-02-21examples/cgroup.py: drive ravel using asyncioHelmut Grohne
2024-02-21fix logic error in populate_sysHelmut Grohne
Fixes: 1de72653e0b9 ("add function linuxnamespaces.populate_sys")