diff options
| author | Olivier Certner <olce.freebsd@certner.fr> | 2023-05-30 16:35:08 +0000 |
|---|---|---|
| committer | Gordon Tetlow <gordon@FreeBSD.org> | 2024-02-14 05:35:46 +0000 |
| commit | c2a9cfc55046127176c74f86c24509ceb9da3551 (patch) | |
| tree | 6c65c1d3f9ae71faea6f783e97a7fd6431be5bee /sys/dev/netmap/netmap_kloop.c | |
| parent | 007b8b8ecd9620c2bc7cba81c04a1ac5576223b1 (diff) | |
setusercontext(): Apply personal settings only on matching effective UID
Commit 35305a8dc114 (r211393) added a check on whether 'uid' was equal
to getuid() before calling setlogincontext(). Doing so still allows
a setuid program to apply resource limits and priorities specified in
a user-controlled configuration file ('~/.login_conf') where
a non-setuid program could not. Plug the hole by checking instead that
the process' effective UID is the target one (which is likely what was
meant in the initial commit).
PR: 271750
Reviewed by: kib, des
MFC after: 2 weeks
Sponsored by: Kumacom SAS
Differential Revision: https://reviews.freebsd.org/D40351
Approved by: so
Security: FreeBSD-EN-24:02.libutil
(cherry picked from commit 892654fe9b5a9115815c30a423b8db47185aebbd)
(cherry picked from commit ede6fd06726c02e9d2a5c47ac8cf80d8aaec5a70)
Diffstat (limited to 'sys/dev/netmap/netmap_kloop.c')
0 files changed, 0 insertions, 0 deletions
