From cf48481217da0cd44a453cc420f3f74cd4820b24 Mon Sep 17 00:00:00 2001 From: jilles Date: Tue, 13 Aug 2013 18:51:26 +0000 Subject: 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 --- sbin/init/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sbin') 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); } } -- cgit v1.1