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 [...]")
Differential Revision: https://reviews.freebsd.org/D51831