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
This commit is contained in:
jilles 2013-08-13 18:51:26 +00:00
parent 7120845712
commit cf48481217

View File

@ -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);
}
}