HomeFreeBSD

jail: fix backfilling the "name" for jid-named jails

Description

jail: fix backfilling the "name" for jid-named jails

Using the cfparam variant of add_param() will actually copy the name and
flags from the passed-in param, which I hadn't considered. We actually
want the name/flags from the "name" param so that we can do variable
expansion against it right after that -- otherwise it cannot be found,
since variable expansion actually searches by name.

While we're here, jls -e was the intermediate name for jls -c that
never saw the light of the day. Fix our existence test.

Reviewed by: jamie
Fixes: 02944d8c49 ("jail: consistently populate the KP_JID [...]")

(cherry picked from commit b81fd3fc8b20eaad64b5c41826432124fd92d6a7)

Details

Provenance
kevansAuthored on Aug 16 2025, 5:39 PM
Parents
rGdf670d26ad5b: jail: consistently populate the KP_JID and KP_NAME parameters
Branches
Unknown
Tags
Unknown