[PATCH RFC] Disable save-entropy in jails

From: Xin Li <delphij_at_delphij.net>
Date: Tue, 24 Dec 2013 12:44:34 -0800
Hi,

I think we shouldn't save entropy inside jails, as the data is not going
to be used by rc script (pjd_at_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)
_at__at_ -42,6 +42,10 _at__at_ 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 <delphij_at_delphij.net>    https://www.delphij.net/
FreeBSD - The Power to Serve!           Live free or die
Received on Tue Dec 24 2013 - 19:44:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:45 UTC