HomeFreeBSD

lualoader: Accept that people use unquoted values in loader.conf

Description

lualoader: Accept that people use unquoted values in loader.conf

While loader.conf(5) suggests that all values should be quoted, reality is
that this was never strictly enforced and it is used. We already make some
concession to this in number values, which aren't strictly quoted either.

The compromise here is that multi-word values must be quoted. This lets
things like foo_load=YES work, while denying more complex expressions on
the right hand side. This likely catches the vast majority of current usage.

A bit of a kludge is needed to accomplish this since Lua regex doesn't
support branching. I had considered splitting up expressions and generating
the right-hand side of the expressions completely in config.parse, but
deemed this too large of an overhaul to take given the current timing. This
should be re-worked shortly after the thaw.

Reported by: royger

Details

Provenance
kevansAuthored on
Parents
rS338258: tftp(1): switch default transfer mode to binary
Branches
Unknown
Tags
Unknown