]> git.ipfire.org Git - thirdparty/systemd.git/commit
uid-range: add new uid_range_load_userns_by_fd() helper
authorLennart Poettering <lennart@poettering.net>
Thu, 20 Apr 2023 16:51:55 +0000 (18:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 6 Apr 2024 14:08:23 +0000 (16:08 +0200)
commit20ba086e775838112e777f8f6dc3c03af4f3d772
tree2ff2d3caba36ea73494bbb7a678cc5d5fb93ed8b
parent6ebb53d945481b9dc1336b2708d0937a8ca6486f
uid-range: add new uid_range_load_userns_by_fd() helper

This is similar to uid_range_load_userns() but instead of reading the
uid_map off a process it reads it off a userns fd.

(Of course the kernel has no API for this right now, hence we fork off a
throw-away process which joins the user namespace, and then read off the
data from there.)
src/basic/uid-range.c
src/basic/uid-range.h