opnsense-src/libexec/flua
Igor Ostapenko 30e6e008bc jail: Add meta and env parameters
Each one is an arbitrary string associated with a jail. It can be set
upon jail creation or added/modified later:

    > jail -cm ... meta="tag1=value1 tag2=value2" env="configuration"

The values are not inherited from the parent jail.

A parent jail can read both metadata parameters, while a child jail can
read only env via security.jail.env sysctl.

The maximum size of meta or env per jail is controlled by the
global security.jail.meta_maxbufsize sysctl. Decreasing it does not
alter the existing meta information.

Each metadata buffer can be handled as a set of key=value\n strings:

    > jail -cm ... meta="$(echo k1=v1; echo k2=v2)" env.1=one
    > jls meta.k2 env.1 meta.k1

While meta.k1= resets the value to an empty string, the meta.k1 without
the equal sign removes the given key.

Relnotes:	yes
Reviewed by:	jamie
Tested by:	dch
Sponsored by:   SkunkWerks GmbH
Differential Revision:	https://reviews.freebsd.org/D47668
2025-03-31 09:17:03 +00:00
..
libfreebsd flua: add freebsd.kenv, kenv(2) bindings 2024-09-14 07:43:50 +02:00
libhash flua: move modules source into the main source directory 2024-09-12 09:03:44 +02:00
libjail jail: Add meta and env parameters 2025-03-31 09:17:03 +00:00
libucl flua: move modules source into the main source directory 2024-09-12 09:03:44 +02:00
modules flua: lposix: add fnmatch function 2024-10-28 16:31:08 +01:00
linit_flua.c flua: lposix: add fnmatch function 2024-10-28 16:31:08 +01:00
Makefile flua: move modules source into the main source directory 2024-09-12 09:03:44 +02:00
Makefile.inc flua: move modules source into the main source directory 2024-09-12 09:03:44 +02:00