From owner-freebsd-hackers@FreeBSD.ORG Mon May 28 08:47:15 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 081E8106566B; Mon, 28 May 2012 08:47:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 754118FC1E; Mon, 28 May 2012 08:47:14 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4S8kwgh082441; Mon, 28 May 2012 11:46:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q4S8kwON068691; Mon, 28 May 2012 11:46:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4S8kwZa068690; Mon, 28 May 2012 11:46:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 28 May 2012 11:46:58 +0300 From: Konstantin Belousov To: Jamie Gritton Message-ID: <20120528084658.GZ2358@deviant.kiev.zoral.com.ua> References: <1337964514.8951.2.camel@powernoodle-l7.corp.yahoo.com> <4FC2B9CA.5090301@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CY2AhQJ0E7w8+M5j" Content-Disposition: inline In-Reply-To: <4FC2B9CA.5090301@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: FreeBSD Hackers , Sean Bruno Subject: Re: [jail] Allowing root privledged users to renice X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2012 08:47:15 -0000 --CY2AhQJ0E7w8+M5j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 27, 2012 at 05:33:30PM -0600, Jamie Gritton wrote: > On 05/25/12 10:48, Sean Bruno wrote: > >I've been toying with the idea of letting jails renice processes ... how > >dangerous and/or stupid is this idea? > > > >=3D=3D=3D=3D //depot/yahoo/ybsd_9/src/sys/kern/kern_jail.c#5 - > >/home/seanbru/ybsd_9/src/sys/kern/kern_jail.c =3D=3D=3D=3D > >270a271,275 > >+ int jail_allow_renice =3D 0; > >+ SYSCTL_INT(_security_jail, OID_AUTO, allow_renice, CTLFLAG_RW, > >+&jail_allow_renice, 0, > >+ "Prison root can renice processes"); > > > >3857a3863,3865 > >+ case PRIV_SCHED_SETPRIORITY: > >+ if (!jail_allow_renice) > >+ return (EPERM); >=20 > Considering they can only renice their own stuff, and could always just > start a new process anyway, I see very little reason to deny this. But the -niced process affects the whole system. --CY2AhQJ0E7w8+M5j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/DO4EACgkQC3+MBN1Mb4hUEACg1uTGJ6ld42xjYfiRhG2tUXy/ zbQAn3Na32FIgtkUOkotwdqZL6UFP/uW =XD8e -----END PGP SIGNATURE----- --CY2AhQJ0E7w8+M5j--