summaryrefslogtreecommitdiffhomepage
path: root/libs/web
diff options
context:
space:
mode:
Diffstat (limited to 'libs/web')
-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 8182679ce7..c43117f3ae 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