Effective rule sets in a jail?

Grzegorz Junka list1 at gjunka.com
Thu Jul 7 09:42:07 UTC 2016


On 07/07/2016 09:03, Miroslav Lachman wrote:
> Grzegorz Junka wrote on 07/07/2016 10:41:
>
>
>> I was referring to this clause in the man document:
>>
>> Descendant jails inherit the parent jail's devfs ruleset enforcement.
>
> This is true for hierarchical "nested" jails = jail inside jail.
> And inheriting doesn't mean merging.
> You can't allow devices in descendant jail which are not allowed on 
> parent.
>
>> I thought that the outside rule is combined with the inside rule in the
>> jail definition. But thanks for the hint about jls -s, it does shows the
>> (single) active rule set (however without referring to the specific
>> rules defined in devfs.rules or a combination of it).
>
> You are mixing nested jails context with jail.conf context where 
> "outside" definitions are the defaults for all jails which are not 
> overriding those values with own values.
>
> Miroslav Lachman

OK, I am just an user, not very familiar with the terminology. For me 
(as a programmer) inheriting means overriding, so merging the more 
specific to the less specific declarations.

Does it mean that the "inheriting" works in nested declarations but 
doesn't take into account the default value? In other words, the default 
is just default unless it re-defined in a jail declaration. If that's 
the case then wouldn't be more clear to name the "outside" default 
declaration as default, e.g. "default_devfs_ruleset"? Then it would be 
more difficult to confuse the default with the one that can be inherited.

Grzegorz


More information about the freebsd-jail mailing list