HomeFreeBSD

setcred(): Fix RACCT resource accounting on credentials change

Description

setcred(): Fix RACCT resource accounting on credentials change

When credentials are changed, we need to adjust the sum of resources
associated to the initial and new process' user IDs (and old and new
login classes and jails, but setcred() does not change them) for them to
stay consistent.

PR: 290352
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53457

(cherry picked from commit 2be5127c4a31bacac9b4158395bfa844f6033626)

Details

Provenance
olceAuthored on Wed, Oct 29, 5:07 PM
Differential Revision
D53457: setcred(): Fix RACCT resource accounting on credentials change
Parents
rG4db768b01cd7: kern: Fix credentials leaks on RACCT but no RCTL
Branches
Unknown
Tags
Unknown