Re: Enhancements to the new rc.d/jail script

From: Scot W. Hetzel <hetzels_at_westbend.net>
Date: Mon, 21 Apr 2003 12:59:43 -0500
From: "Doug Barton" <DougB_at_freebsd.org>
> On Mon, 21 Apr 2003, Scot W. Hetzel wrote:
>
> > If a sys admin defines ruleset 10 in /etc/rc.devfs, then either the 2
will
> > be merged or the rc.d/devfs ruleset will be overwritten (if "/sbin/devfs
> > rule -s 10 delset" is in /etc/rc.devfs).
>
> Thanks for the clarification. I think that this has enough foot-shooting
> potential that it should probably be hidden behind a knob in rc.conf.
>

What do you think of the following changes?

/etc/defaults/rc.conf
    :
    devfs_jail_ruleset_enable    # Enable Standard Jail ruleset
    devfs_jail_ruleset_num='666'  # Standard Jail ruleset number (change if
it conflicts with your rulesets)
                                              # Also change
jail_default_ruleset to match.
    :
    jail_default_ruleset='666'    # Default ruleset to apply to a jail if
devfs enabled and no ruleset specified.
    :

/etc/rc.d/devfs
    :
    # Standard Jail ruleset
    if checkyesno devfs_jail_ruleset_enable ; then
        /sbin/devfs -s ${devfs_jail_ruleset_num} delset
        :
        :
    fi
    :

We could also enable the Standard Jail ruleset when jail_enable is set.

Scot
Received on Mon Apr 21 2003 - 08:59:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:04 UTC