summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-11 10:49:44 +0000
committerSteven Barth <steven@midlink.org>2008-08-11 10:49:44 +0000
commitfdce917da5461f7b2a1a870be34da1a785cbfc4c (patch)
tree99d086c9774ff3d15151e635fc5a0a1429ca8c2a
parentf83bb9996b7bd36e8f032e389ad4eb4a3bfe590d (diff)
libs/web: Even more sanity checks
-rw-r--r--libs/web/luasrc/sauth.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/web/luasrc/sauth.lua b/libs/web/luasrc/sauth.lua
index 8182679ce..c43117f3a 100644
--- 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