summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_loginclass.c
Commit message (Collapse)AuthorAgeFilesLines
* Speed up rctl operation with large rulesets, by holding the locktrasz2015-11-151-1/+6
| | | | | | | | | during iteration instead of relocking it for each traversed rule. Reviewed by: mjg@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4110
* cred: add proc_set_cred helpermjg2015-03-161-1/+1
| | | | | | | The goal here is to provide one place altering process credentials. This eases debugging and opens up posibilities to do additional work when such an action is performed.
* Simplify sys_getloginclass.mjg2014-10-281-14/+4
| | | | | Just use current thread credentials as they have the same accuracy as the ones obtained from proc..
* Change loginclass mutex to an rwlock.mjg2014-10-281-34/+60
| | | | | | | | While here reduce nesting in loginclass_free. Submitted by: Tiwei Bie <btw mail.ustc.edu.cn> X-Additional: JuniorJobs project MFC after: 2 weeks
* Initialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU.trasz2014-05-141-10/+1
| | | | | | Suggested by: rwatson@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-161-2/+2
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* Add racct. It's an API to keep per-process, per-jail, per-loginclasstrasz2011-03-291-1/+19
| | | | | | | | | and per-loginclass resource accounting information, to be used by the new resource limits code. It's connected to the build, but the code that actually calls the new functions will come later. Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version)
* Add two new system calls, setloginclass(2) and getloginclass(2). This makestrasz2011-03-051-0/+220
it possible for the kernel to track login class the process is assigned to, which is required for RCTL. This change also make setusercontext(3) call setloginclass(2) and makes it possible to retrieve current login class using id(1). Reviewed by: kib (as part of a larger patch)
OpenPOWER on IntegriCloud