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
|
end
|
||||||
local function canread(fn)
|
local function canread(fn)
|
||||||
fn = fs.canonical(fn)
|
fn = fs.canonical(fn)
|
||||||
|
if os.getuid() == "nobody" then return false end
|
||||||
if os.getuid() ~= "superuser" and fsattr[fn] then
|
if os.getuid() ~= "superuser" and fsattr[fn] then
|
||||||
if not parseacl(fsattr[fn].read or "")[os.getuid()] then return false end
|
if not parseacl(fsattr[fn].read or "")[os.getuid()] then return false end
|
||||||
end
|
end
|
||||||
@ -25,6 +26,7 @@ do
|
|||||||
end
|
end
|
||||||
local function canwrite(fn)
|
local function canwrite(fn)
|
||||||
fn = fs.canonical(fn)
|
fn = fs.canonical(fn)
|
||||||
|
if os.getuid() == "nobody" then return false end
|
||||||
if os.getuid() ~= "superuser" and fsattr[fn] then
|
if os.getuid() ~= "superuser" and fsattr[fn] then
|
||||||
if not parseacl(fsattr[fn].write)[os.getuid()] then return false end
|
if not parseacl(fsattr[fn].write)[os.getuid()] then return false end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user