Age | Commit message (Collapse) | Author | |
---|---|---|---|
2024-06-16 | populate_dev: also provide /dev/shm | Helmut Grohne | |
This is needed e.g. for Python's multiprocessing.SemLock. | |||
2024-06-16 | populate_dev: install /dev/fd | Helmut Grohne | |
This symlink turns out to be important for execveat. Its NOTES section details that /dev/fd needs to work in order for execveat to work. We better provide this symlink. | |||
2024-06-11 | fix formatting and spelling errors | Helmut Grohne | |
No functional changes. | |||
2024-06-11 | improve typing | Helmut Grohne | |
linuxnamespaces/__init__.py: * linuxnamespaces.filedescriptor only exports FileDescriptor. By importing *, we re-export it implicitly. linuxnamespaces/atlocation.py: * PathLike should be parameterized and we no longer allow bytes there. linuxnamespaces/tarutils.py: * Resolve dict vs Mapping. tests/test_simple.py: * Establish expected type to mypy. examples/unschroot.py: * pidfd is first an int and later a FileDescriptor, but we always use it as int. * Also tell mypy that we cannot get NULL from waitid. | |||
2024-05-28 | support sendfile in async_copyfd | Helmut Grohne | |
2024-05-27 | add IDAllocation.reserve method | Helmut Grohne | |
Allow reserving a particular range instead of allocating a suitable large range of an IDAllocation. This is useful when a directory hierarchy defines the allocation and we merely want to verify it to be assigned. | |||
2024-05-25 | add a FileDescriptor type | Helmut Grohne | |
It serves two main purposes. For one thing, it allows telling bare integers and file descriptors apart on a typing level similar to a NewType. For another it adds common methods to a file descriptor and enables closing it via a context manager. | |||
2024-05-20 | add an asyncio waitid(P_PIDFD, ...) helper | Helmut Grohne | |
2024-05-20 | add function async_copyfd | Helmut Grohne | |
It is a bit like an async version of shutil.copyfileobj but for bare file descriptors and has an optimized version for pipes. | |||
2024-05-20 | Revert "add a splice syscall wrapper" | Helmut Grohne | |
os.splice from Python >= 3.10 is good enough. This reverts commit 056c1f964f55adedc17f8d7bddef1f48c73852c7. | |||
2024-05-20 | syscalls: use >= 3.10 support for eventfds in os module | Helmut Grohne | |
2024-05-17 | add a splice syscall wrapper | Helmut Grohne | |
2024-05-17 | add prctl_set_child_subreaper | Helmut Grohne | |
2024-05-17 | populate_dev: also create std{in,out,err} symlinks | Helmut Grohne | |
When booting systemd, it'll create these symlinks, but when doing an application container, nothing does this and we risk creating regular files there. | |||
2024-05-09 | add linuxnamespaces.tarinfo.XAttrTarFile | Helmut Grohne | |
This is a mixin subclass for TarFile that enables it to restore and apply linux extended attributes as PAX headers in the SCHILY.xattr.* format. As a consequence, this enables us to process tar archives containing file system capabilities. | |||
2024-05-09 | add linuxnamespaces.tarutils | Helmut Grohne | |
Move the generic tar utilities from the chroottar.py example into a linuxnamespaces module as dealing with tar archives is a fairly common thing when dealing with namespaces. | |||
2024-05-07 | mount: allow data argument to be a list | Helmut Grohne | |
2024-05-06 | syscalls: allow logging of syscalls | Helmut Grohne | |
2024-04-23 | lift the dbus functionality from the cgroup example | Helmut Grohne | |
2024-04-04 | avoid hard coding the soname of the libc | Helmut Grohne | |
Passing None as name also yields libc functions. | |||
2024-04-04 | add method AtLocation.as_emptypath for cloning a location | Helmut Grohne | |
2024-04-04 | add syscall wrapper for prctl(PR_SET_PDEATHSIG, ...) | Helmut Grohne | |
2024-04-04 | add function populate_proc | Helmut Grohne | |
2024-04-04 | document security implications of populate_* functions | Helmut Grohne | |
2024-04-03 | AtLocation.walk: add support for AT_EMPTY_PATH | Helmut Grohne | |
2024-04-03 | AtLocation.walk: emit nofllow flag when follow_symlinks=False | Helmut Grohne | |
2024-04-03 | AtLocation.readlink: require AT_SYMLINK_NOFOLLOW | Helmut Grohne | |
It does not make sense to read a link after having followed it. | |||
2024-04-02 | improve AtLocation.join semantics | Helmut 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-02 | a few formatting and typo fixes | Helmut Grohne | |
2024-04-02 | add documentation regarding resource management of AtLocations | Helmut Grohne | |
2024-04-02 | fix logic error in AtLocation.stat | Helmut Grohne | |
Fixes: 1c265b6e11c3 ("add os.stat wrapper AtLocation.stat") | |||
2024-03-24 | AtLocation.mkdir: support optional arguments from pathlib | Helmut Grohne | |
2024-03-22 | add convenience functions for stat to AtLocationLike | Helmut Grohne | |
These are the is_* family and exists all from pathlib.Path. | |||
2024-03-22 | add os.stat wrapper AtLocation.stat | Helmut Grohne | |
2024-03-16 | add an asyncio variant of run_in_fork | Helmut Grohne | |
2024-03-14 | rename AtLocation.symlink to symlink_to | Helmut Grohne | |
This mirrors what was done for pathlib.Path to avoid confusion about argument order. | |||
2024-03-12 | work around mypy misdetection on bookworm | Helmut Grohne | |
2024-03-11 | add method AtLocation.is_absolute | Helmut Grohne | |
This is similar to pathlib.Path.is_absolute. | |||
2024-03-07 | add AtLocation.rename method wrapping os.rename | Helmut Grohne | |
2024-03-07 | add AtLocation.link method wrapping os.link | Helmut Grohne | |
2024-03-03 | add function for prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, ...) | Helmut Grohne | |
2024-03-03 | implement repr for AtLocation | Helmut Grohne | |
2024-03-02 | fix typos | Jakub Wilk | |
2024-03-01 | add rudimentary prctl syscall wrapper | Helmut Grohne | |
2024-03-01 | fix read-only bind_mount | Helmut 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-25 | spell check | Helmut Grohne | |
2024-02-24 | populate_dev: remove assumption that newdev does not shadow origdev | Helmut Grohne | |
In particular, one can now pass newdev = origdev. | |||
2024-02-23 | delete unused imports | Helmut Grohne | |
2024-02-21 | fix logic error in populate_sys | Helmut Grohne | |
Fixes: 1de72653e0b9 ("add function linuxnamespaces.populate_sys") | |||
2024-02-21 | improve error handling in linuxnamespaces.populate_dev | Helmut Grohne | |