From owner-freebsd-current@FreeBSD.ORG Tue Dec 24 20:44:35 2013 Return-Path: Delivered-To: freebsd-current@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 ESMTPS id C830CA64; Tue, 24 Dec 2013 20:44:35 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A77101F12; Tue, 24 Dec 2013 20:44:35 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 2D541263E3; Tue, 24 Dec 2013 12:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1387917875; bh=6T8/oAxqiws9fdXhphx7ojIsXC9J4bJkA7xDP/mfoRg=; h=Date:From:Reply-To:To:CC:Subject; b=AfJU+UAxds1Suuc+kBOzTUpYE1sf6rNlnJIip3586WQA1Wp0dpR0v+MIVQTQLfybq UmtpzTD1F/RRXMp+yaebMmeS3QtZoI5e/y0ysyyC/g7bhxf+zA7GFDJx1N8HFUpD7L pOLSzSh8xmZGLXMEhKuSK1P7rBXAM7GJVHV9qgGw= Message-ID: <52B9F232.1090002@delphij.net> Date: Tue, 24 Dec 2013 12:44:34 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: "freebsd-security@freebsd.org" Subject: [PATCH RFC] Disable save-entropy in jails X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: d@delphij.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 20:44:35 -0000 Hi, I think we shouldn't save entropy inside jails, as the data is not going to be used by rc script (pjd@126744). If there is no objections, I will commit this changeset on January 1, 2014. Index: libexec/save-entropy/save-entropy.sh =================================================================== --- libexec/save-entropy/save-entropy.sh (revision 259828) +++ libexec/save-entropy/save-entropy.sh (working copy) @@ -42,6 +42,10 @@ elif [ -r /etc/rc.conf ]; then . /etc/rc.conf 2>/dev/null fi +if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then + exit 0 +fi + case ${entropy_dir} in [Nn][Oo]) exit 0 Cheers, -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die