git: jail: Implement read-only sysctl "jail.jailed"
aly at crater.dragonflybsd.org
Mon Jun 17 18:52:40 PDT 2019
Author: Aaron LI <aly at aaronly.me>
Date: Mon Jun 17 22:05:41 2019 +0800
jail: Implement read-only sysctl "jail.jailed"
Implement the read-only sysctl entry 'jail.jailed', which can be used to
determine if a process is running inside a jail (value is 1) or not
(value is 0).
NOTE: The current FreeBSD has such a sysctl entry called
'security.jail.jailed'. However, DragonFly BSD doesn't not have any
'security.jail.*' but only 'jail.*' sysctl entries.
Meanwhile, update /etc/rc to use this new sysctl entry to better deal
with the rc scripts with the 'nojail' keyword.
Also document this sysctl entry in the jail.8 man page.
This commit is based mostly on FreeBSD as well as the patch in bug
Reviewed-by: dillon, mjg (Mateusz Guzik)
Summary of changes:
etc/rc | 7 ++++++-
sys/kern/kern_jail.c | 15 +++++++++++++++
usr.sbin/jail/jail.8 | 5 ++++-
3 files changed, 25 insertions(+), 2 deletions(-)
DragonFly BSD source repository
More information about the Commits