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)
Sun, Dec 15, 3:56 AM
Unknown Object (File)
Tue, Dec 10, 7:37 AM
Unknown Object (File)
Mon, Dec 2, 5:26 AM
Unknown Object (File)
Mon, Dec 2, 5:26 AM
Unknown Object (File)
Mon, Dec 2, 5:26 AM
Unknown Object (File)
Mon, Dec 2, 2:42 AM
Unknown Object (File)
Nov 26 2024, 12:03 AM
Unknown Object (File)
Oct 20 2024, 3:36 PM
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.