Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 2025 11:37:34 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        "Simon J. Gerraty" <sjg@freebsd.org>, src-committers@freebsd.org,  dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 61d77e6c0095 - main - loader: allow for exceptions to restricted settings.
Message-ID:  <CANCZdfqK6PpY64gbVJ%2Bsa5UdWpLhra5=uVE8NFcKQCGc0XknSg@mail.gmail.com>
In-Reply-To: <24533e37-2396-40ef-ba84-a5339b811527@FreeBSD.org>
References:  <202506020549.5525nuDu054998@gitrepo.freebsd.org> <24533e37-2396-40ef-ba84-a5339b811527@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 2, 2025 at 10:14=E2=80=AFAM Kyle Evans <kevans@freebsd.org> wro=
te:
>
> On 6/2/25 00:49, Simon J. Gerraty wrote:
> > The branch main has been updated by sjg:
> >
> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D61d77e6c009544d1489078c1=
6a5d22b27d25c91b
> >
> > commit 61d77e6c009544d1489078c16a5d22b27d25c91b
> > Author:     Simon J. Gerraty <sjg@FreeBSD.org>
> > AuthorDate: 2025-06-02 05:48:43 +0000
> > Commit:     Simon J. Gerraty <sjg@FreeBSD.org>
> > CommitDate: 2025-06-02 05:48:43 +0000
> >
> >      loader: allow for exceptions to restricted settings.
> >
> >      We restrict what an unverified loader.conf etc can set,
> >      and the same restrictions are applied to interactive input.
> >      We need to allow for exceptions (eg boot_verbose).
> >      It is best if any allowed settings match up to '=3D'.
> >
> >      If we do not allow it to be set, do not allow it to be unset
> >
> >      Reviewed by:    stevek
> >      Sponsored by:   Juniper Networks, Inc.
> > ---
> Long-term, we should probably work out something that can work for
> lualoader, too.  We use setenv() there directly rather than adding a
> layer of indirection through the command-line parser.

Yea, I'd rather this be a property of the env variable than having lists li=
ke
this anyway. And that would solve another problem I have from time to time
which is needing to have an always existing env variable with a default, bu=
t
overridable value. In these cases, you have to set that up in code, and it'=
s a
bit of a bother. If we do it right, we could have a three-fer: works
with lua, works
to set certain things immutable after a time and also lets us initialize th=
ings.
Though getting the details right so that we can set these in
loader.conf, but then
not set them on the command line is the most likely use case, and I
thought for that
use case we did the right thing in lualoader. no?

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqK6PpY64gbVJ%2Bsa5UdWpLhra5=uVE8NFcKQCGc0XknSg>