summaryrefslogtreecommitdiffstats
path: root/sbin/init
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-08-13 18:51:26 +0000
committerjilles <jilles@FreeBSD.org>2013-08-13 18:51:26 +0000
commitcf48481217da0cd44a453cc420f3f74cd4820b24 (patch)
tree5cc0b5677640ea2e1aa29da6294ef45d5dd4137a /sbin/init
parent71208457122de84cfb4b62db95eaa32a001acb2c (diff)
downloadFreeBSD-src-cf48481217da0cd44a453cc420f3f74cd4820b24.zip
FreeBSD-src-cf48481217da0cd44a453cc420f3f74cd4820b24.tar.gz
init: Set kernel login class and CPU mask on new processes.
In particular, this makes the kernel login class on processes started from /etc/rc "daemon" instead of "default". Reviewed by: trasz
Diffstat (limited to 'sbin/init')
-rw-r--r--sbin/init/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c
index c19b070..99041c9 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -1729,7 +1729,8 @@ setprocresources(const char *cname)
login_cap_t *lc;
if ((lc = login_getclassbyname(cname, NULL)) != NULL) {
setusercontext(lc, (struct passwd*)NULL, 0,
- LOGIN_SETPRIORITY | LOGIN_SETRESOURCES);
+ LOGIN_SETPRIORITY | LOGIN_SETRESOURCES |
+ LOGIN_SETLOGINCLASS | LOGIN_SETCPUMASK);
login_close(lc);
}
}
OpenPOWER on IntegriCloud