Page MenuHomeFreeBSD

lualoader: Expose loader.parse and add cli.parse_and_execute
ClosedPublic

Authored by kevans on Mar 4 2018, 2:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 20 2024, 3:36 PM
Unknown Object (File)
Oct 15 2024, 2:36 AM
Unknown Object (File)
Oct 2 2024, 12:31 PM
Unknown Object (File)
Oct 1 2024, 1:58 PM
Unknown Object (File)
Sep 17 2024, 5:54 AM
Unknown Object (File)
Sep 8 2024, 10:53 PM
Unknown Object (File)
Sep 7 2024, 1:51 PM
Unknown Object (File)
Sep 7 2024, 4:13 AM
Subscribers
None

Details

Summary

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.

parse_and_execute 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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I should probably add a note to 'cli' that most of these functions will violate our standard naming convention... loader commands tend to use hyphens or underscore to separate words, so functions that may be executed at the loader prompt should follow suit.

This revision is now accepted and ready to land.Mar 7 2018, 5:23 PM
This revision was automatically updated to reflect the committed changes.