diff options
author | trasz <trasz@FreeBSD.org> | 2011-03-05 12:40:35 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2011-03-05 12:40:35 +0000 |
commit | 62f6a13e39978ed28ac30de98bfd177259f00de2 (patch) | |
tree | 8810ff86b50f45ade154877395ba9bd0885b1dea /sys/kern/init_main.c | |
parent | 154e7a9e1b3b5b34692d8c1e59704d1567bbc073 (diff) | |
download | FreeBSD-src-62f6a13e39978ed28ac30de98bfd177259f00de2.zip FreeBSD-src-62f6a13e39978ed28ac30de98bfd177259f00de2.tar.gz |
Add two new system calls, setloginclass(2) and getloginclass(2). This makes
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)
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index f472c82..9250e79 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include <sys/jail.h> #include <sys/ktr.h> #include <sys/lock.h> +#include <sys/loginclass.h> #include <sys/mount.h> #include <sys/mutex.h> #include <sys/syscallsubr.h> @@ -484,6 +485,7 @@ proc0_init(void *dummy __unused) p->p_ucred->cr_uidinfo = uifind(0); p->p_ucred->cr_ruidinfo = uifind(0); p->p_ucred->cr_prison = &prison0; + p->p_ucred->cr_loginclass = loginclass_find("default"); #ifdef AUDIT audit_cred_kproc0(p->p_ucred); #endif |