https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260248

cr...@rlwinm.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cr...@rlwinm.de

--- Comment #7 from cr...@rlwinm.de ---
The problem is that the support for /etc/jail.conf.d/$name was implemented
inside the rc.d script instead of jail.conf. Inside said script each jail is
started/stopped by invoking jail -f $conf ... $name. The other config files
aren't read so separate invocations of the jail command don't know about each
others configuration. It was a useful hack at the time, but FreeBSD ≥ 14.0
support native .include directives with globs. The proper solution is to put
something like this in your /etc/jail.conf:

    .include "/usr/local/etc/jail[.]conf";   # load local defaults
    .include "/etc/jail.d/*.conf";           # don't have /etc/jail.conf.d
because
    .include "/usr/local/etc/jail.d/*.conf"; # it triggers the rc.d workaround.

You can't just have the rc.d script generate a jail.conf(5) that includes all
configs in /etc/jail.conf.d, because the global variable would carry over
between files which would be a massive POLA violation.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to