Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Aug 2013 18:51:27 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254288 - head/sbin/init
Message-ID:  <201308131851.r7DIpRwO043291@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Tue Aug 13 18:51:26 2013
New Revision: 254288
URL: http://svnweb.freebsd.org/changeset/base/254288

Log:
  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

Modified:
  head/sbin/init/init.c

Modified: head/sbin/init/init.c
==============================================================================
--- head/sbin/init/init.c	Tue Aug 13 18:45:58 2013	(r254287)
+++ head/sbin/init/init.c	Tue Aug 13 18:51:26 2013	(r254288)
@@ -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);
 	}
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308131851.r7DIpRwO043291>