Skip to content

Commit 7047250

Browse files
committed
Add request for fd iteration without /proc
1 parent 12ca3c8 commit 7047250

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,3 +1018,17 @@ specific implementations. It would be much nicer and universally
10181018
applicable if such a check could be done generically. It would
10191019
probably suffice to provide an `ioctl()` call on the `pidns` file
10201020
descriptor that reveals this kind of information in some form.
1021+
1022+
### A way to iterate process file descriptors without /proc
1023+
1024+
[x] A way to iterate process file descriptors without needing
1025+
`/proc` mounted. Could be an `ioctl()` which takes a buffer,
1026+
size and a `last_fd` argument and fills the buffer with fd
1027+
numbers after the provided `last_fd`.
1028+
1029+
**Use-Case**: In `mkosi-sandbox` and other sandboxing tools
1030+
that let you set up an arbitrary sandbox, we can't rely on the
1031+
sandbox having `/proc` mounted, yet we still need to be able to
1032+
do systemd's fd packing algorithm. This requires being able to
1033+
iterate over all inherited fds in a somewhat efficient manner
1034+
without having `/proc` mounted.

0 commit comments

Comments
 (0)