FreeBSD Bugzilla – Attachment 235527 Details for
Bug 265001
/boot/loader: Lua: lines containing a comment that contains a '"' in loader.conf are ignored
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Prevent '"' from being incorporated into name="value" pairs in /boot/loader.conf
config.lua.diff (text/plain), 1.40 KB, created by
crahman
on 2022-07-28 12:27:47 UTC
(
hide
)
Description:
Prevent '"' from being incorporated into name="value" pairs in /boot/loader.conf
Filename:
MIME Type:
Creator:
crahman
Created:
2022-07-28 12:27:47 UTC
Size:
1.40 KB
patch
obsolete
>diff --git a/stand/lua/config.lua b/stand/lua/config.lua >index 9ef7c0796f4..7fff5c2ba38 100644 >--- a/stand/lua/config.lua >+++ b/stand/lua/config.lua >@@ -63,7 +63,7 @@ local MSG_FAILSYN_EOLVAR = "Unescaped $ at end of line" > local MSG_FAILSYN_BADVAR = "Malformed variable expression at position '%d'" > > local MODULEEXPR = '([-%w_]+)' >-local QVALEXPR = '"(.*)"' >+local QVALEXPR = '"([^"]*)"' > local QVALREPL = QVALEXPR:gsub('%%', '%%%%') > local WORDEXPR = "([-%w%d][-%w%d_.]*)" > local WORDREPL = WORDEXPR:gsub('%%', '%%%%') >diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua >index fe6f7da6428..69866c6ca04 100644 >--- a/stand/lua/menu.lua >+++ b/stand/lua/menu.lua >@@ -58,6 +58,9 @@ local function bootenvSet(env) > loader.setenv("vfs.root.mountfrom", env) > loader.setenv("currdev", env .. ":") > config.reload() >+ if loader.getenv("kernelname") ~= nil then >+ loader.perform("unload") >+ end > end > > -- Module exports >diff --git a/stand/lua/password.lua b/stand/lua/password.lua >index 8edd4edd7ec..3aea8e80bae 100644 >--- a/stand/lua/password.lua >+++ b/stand/lua/password.lua >@@ -135,6 +135,7 @@ function password.check() > local pwd = loader.getenv("password") > if pwd ~= nil then > core.autoboot() >+ loader.setenv("autoboot_delay", "NO") > -- The autoboot sequence was interrupted, so we'll need to > -- prompt for a password. Put the screen back into a known > -- good state, otherwise we're drawing back a couple lines
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 265001
:
235527
|
235528