From owner-svn-src-all@FreeBSD.ORG Tue Aug 13 18:51:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84F568C0; Tue, 13 Aug 2013 18:51:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 733D62CAF; Tue, 13 Aug 2013 18:51:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7DIpR3J043292; Tue, 13 Aug 2013 18:51:27 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7DIpRwO043291; Tue, 13 Aug 2013 18:51:27 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308131851.r7DIpRwO043291@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 13 Aug 2013 18:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254288 - head/sbin/init X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 18:51:27 -0000 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); } }