Date: Sat, 27 Oct 2018 04:10:42 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339805 - head/stand/lua Message-ID: <201810270410.w9R4Ag8N014936@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Sat Oct 27 04:10:42 2018 New Revision: 339805 URL: https://svnweb.freebsd.org/changeset/base/339805 Log: lualoader: Always return a proper dictionary for blacklist If module_blacklist isn't specified, we have an empty blacklist; effectively the same as if module_blacklist="" were specified in loader.conf(5). This was reported when switching to a BE that predated the module_blacklist introduction, but the problem is valid all the same and likely to be tripped over in other scenarios. Reported by: bwidawsk MFC after: 3 days Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Sat Oct 27 03:37:14 2018 (r339804) +++ head/stand/lua/config.lua Sat Oct 27 04:10:42 2018 (r339805) @@ -266,12 +266,12 @@ local function isValidComment(line) end local function getBlacklist() + local blacklist = {} local blacklist_str = loader.getenv('module_blacklist') if blacklist_str == nil then - return nil + return blacklist end - local blacklist = {} for mod in blacklist_str:gmatch("[;, ]?([%w-_]+)[;, ]?") do blacklist[mod] = true end
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810270410.w9R4Ag8N014936>