if indexcache then
local cachedate = fs.mtime(indexcache)
if cachedate and cachedate > fs.mtime(path) then
+
+ assert(
+ sys.process.info("uid") == fs.stat(indexcache, "uid")
+ and fs.stat(indexcache, "mode") == "rw-------",
+ "Fatal: Indexcache is not sane!"
+ )
+
index = loadfile(indexcache)()
return index
end
if indexcache then
fs.writefile(indexcache, util.get_bytecode(index))
+ fs.chmod(indexcache, "a-rwx,u+rw")
end
end
require "luci.i18n".loadc("default")
local scope = setmetatable({}, {__index = _G})
- for k,v in pairs(_M) do
+ for k,v in pairs(luci.dispatcher) do
if type(v) == "function" then
scope[k] = v
end