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)
Mar 9 2024, 2:44 AM
Unknown Object (File)
Mar 9 2024, 2:44 AM
Unknown Object (File)
Mar 9 2024, 2:44 AM
Unknown Object (File)
Mar 9 2024, 2:32 AM
Unknown Object (File)
Jan 9 2024, 1:02 PM
Unknown Object (File)
Dec 30 2023, 5:20 AM
Unknown Object (File)
Dec 25 2023, 9:39 AM
Unknown Object (File)
Dec 20 2023, 1:12 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.