]> git.ipfire.org Git - thirdparty/systemd.git/commit
Fallback from pidfd_open on permission errors too
authorLuca Boccassi <bluca@debian.org>
Fri, 23 Feb 2024 21:09:11 +0000 (21:09 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 24 Feb 2024 03:58:13 +0000 (12:58 +0900)
commit857945cc5f2a4c1d6aa0bd7532a995c8480b1cc3
tree03fe2796d097a4d08d100155ad79b843d5f37370
parentafdf63fcf2c6112278d6b0f456bfecca4d6ec3c7
Fallback from pidfd_open on permission errors too

Skip using pidfds if we get a permission denied error.
This can happen with an old policy and a new kernel that uses the
new pidfs filesystem to back pidfds, instead of anonymous inodes,
as the existing policy denies access.

This is already the case for most uses of pidfd_open, like pidref,
but not on these two. Fix them.
src/login/pam_systemd.c
src/systemctl/systemctl-show.c