instance: add 'requirejail' attribute
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Thu, 30 Jan 2020 17:35:06 +0000 (17:35 +0000)
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Sat, 1 Feb 2020 21:22:08 +0000 (21:22 +0000)
commitbcb86554f1b454531e79dac82fcb0463d125f2fb
tree8e48be0b51f965f90611018155836f4929d5a42f
parent00aafc4f439ec3ace834c1a803b899bd1ceba9db
instance: add 'requirejail' attribute

Since commit b44417c instance: provide error feedback if ujail binary is
missing, worrying log spam of the form "unable to find /sbin/jail ..."
may be encountered.

On systems not configured with jail capabilities the lack of jail binary
is not an error, whilst on systems with jail capabilities the warning
will be issued and the process is started outside of a jail.

This commit adds a new procd jail parameter 'mustjail' which if set
issues an error and does NOT start the process outside of a jailed
environment.

The original 'unable to find jail binary' warning is output in DEBUG
mode, thus processes started in a 'may jail' but non-jail capable
environment do not spam the log.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
service/instance.c
service/instance.h