mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
setclasspriority(): New possible value 'inherit'
It indicates to the login.conf machinery (setusercontext() / setclasscontext()) to leave priority alone, effectively inheriting it from the parent process. PR: 271749 Reviewed by: emaste, yuripv Approved by: emaste (mentor) MFC after: 3 days Relnotes: yes Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40690
This commit is contained in:
parent
7b94ec550e
commit
d162d7e2ad
1 changed files with 7 additions and 1 deletions
|
|
@ -462,9 +462,15 @@ static void
|
|||
setclasspriority(login_cap_t * const lc, struct passwd const * const pwd)
|
||||
{
|
||||
const rlim_t def_val = LOGIN_DEFPRI, err_val = INT64_MIN;
|
||||
rlim_t p = login_getcapnum(lc, "priority", def_val, err_val);
|
||||
rlim_t p;
|
||||
int rc;
|
||||
|
||||
/* If value is "inherit", nothing to change. */
|
||||
if (login_getcapenum(lc, "priority", inherit_enum) == 0)
|
||||
return;
|
||||
|
||||
p = login_getcapnum(lc, "priority", def_val, err_val);
|
||||
|
||||
if (p == err_val) {
|
||||
/* Invariant: 'lc' != NULL. */
|
||||
syslog(LOG_WARNING,
|
||||
|
|
|
|||
Loading…
Reference in a new issue