setusercontext(): Set priority from '~/.login_conf' as well
authorOlivier Certner <olce.freebsd@certner.fr>
Tue, 30 May 2023 15:14:50 +0000 (17:14 +0200)
committerOlivier Certner <olce@FreeBSD.org>
Mon, 29 Jan 2024 21:58:09 +0000 (22:58 +0100)
commitf2a0277d3e51a6a839151eef17f466d0db2b7300
tree625f71cb55518e051f8dfb73f967a04936ec4002
parent33d4ce5496efe96bbaa7663e298876395b1db62c
setusercontext(): Set priority from '~/.login_conf' as well

Setting the process priority is done only when the current process'
effective UID corresponds to that for which context is to be set.
Consequently, setting priority is done with appropriate credentials and
will fail if the target user tries to raise it unduly via his
'~/.login_conf'.

PR:                     271751
Reviewed by:            kib, Andrew Gierth <andrew_tao173.riddles.org.uk>
Approved by:            emaste (mentor)
MFC after:              3 days
Relnotes:               yes
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40352
lib/libutil/login_class.c