the nobody UID is no longer allowed to read or write files
This commit is contained in:
parent
4e3b65ad38
commit
ae083f57d9
@ -18,6 +18,7 @@ do
|
||||
end
|
||||
local function canread(fn)
|
||||
fn = fs.canonical(fn)
|
||||
if os.getuid() == "nobody" then return false end
|
||||
if os.getuid() ~= "superuser" and fsattr[fn] then
|
||||
if not parseacl(fsattr[fn].read or "")[os.getuid()] then return false end
|
||||
end
|
||||
@ -25,6 +26,7 @@ do
|
||||
end
|
||||
local function canwrite(fn)
|
||||
fn = fs.canonical(fn)
|
||||
if os.getuid() == "nobody" then return false end
|
||||
if os.getuid() ~= "superuser" and fsattr[fn] then
|
||||
if not parseacl(fsattr[fn].write)[os.getuid()] then return false end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user