]> git.ipfire.org Git - thirdparty/systemd.git/commit
pidfd-util: open an internal pidfd if none is passed in pidfd_check_pidfs()
authorMike Yuan <me@yhndnzj.com>
Sun, 1 Jun 2025 06:55:50 +0000 (08:55 +0200)
committerMike Yuan <me@yhndnzj.com>
Wed, 4 Jun 2025 22:28:01 +0000 (00:28 +0200)
commite09b7ced6557135becc8f5fb6dc23db753772124
tree9ebc0d00fcd7e175efce6f7a8fc1bbfbd81a7ee9
parentdbb28f7b2461e3029b5c2edfe8e0cceb1b119409
pidfd-util: open an internal pidfd if none is passed in pidfd_check_pidfs()

I'd like to introduce a libsystemd helper for acquiring pidfd
inode id, which however means the fd passed to pidfd_check_pidfs()
can no longer be trusted. Let's add back the logic of allocating
a genuine pidfd allocated internally, which was remove in
5dc9d5b4eacbe32f58ad6ca18d70931ab89ea409.
src/basic/pidfd-util.c