projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f83bb99
)
libs/web: Even more sanity checks
author
Steven Barth
<steven@midlink.org>
Mon, 11 Aug 2008 10:49:44 +0000
(10:49 +0000)
committer
Steven Barth
<steven@midlink.org>
Mon, 11 Aug 2008 10:49:44 +0000
(10:49 +0000)
libs/web/luasrc/sauth.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/sauth.lua
b/libs/web/luasrc/sauth.lua
index 8182679ce78d2a7356990e4cb2ad7ed362879c5d..c43117f3ae50ec4952a289e5403e4089f48ce571 100644
(file)
--- a/
libs/web/luasrc/sauth.lua
+++ b/
libs/web/luasrc/sauth.lua
@@
-17,6
+17,7
@@
$Id$
module("luci.sauth", package.seeall)
require("luci.fs")
require("luci.util")
+require("luci.sys")
require("luci.config")
@@
-65,7
+66,8
@@
end
--- Check whether Session environment is sane.
-- @return Boolean status
function sane()
- return luci.fs.stat(sessionpath, "mode") == "rwx------"
+ return luci.sys.process.info("uid") == luci.fs.stat(sessionpath, "uid")
+ and luci.fs.stat(sessionpath, "mode") == "rwx------"
end