HomeFreeBSD

lualoader: Expose loader.parse and add cli_execute_unparsed

Description

lualoader: Expose loader.parse and add cli_execute_unparsed

This will be used for scenarios where the command to execute is coming in
via the environment (from, for example, loader.conf(5)) and is thus not
necessarily trusted.

cli_execute_unparsed will immediately be used for handling
module_{before,after,error} as well as menu_timeout_command. We still want
to offer these variables the ability to execute Lua-intercepted loader
commands, but we don't want them to be able to execute arbitrary Lua.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D14580

Details

Provenance
kevansAuthored on
Reviewer
imp
Differential Revision
D14580: lualoader: Expose loader.parse and add cli.parse_and_execute
Parents
rS330615: Fix a lock recursion introduced in r327065.
Branches
Unknown
Tags
Unknown