summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-02-09 12:14:20 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-02-09 12:14:20 +0100
commit993cf1222998a7e3e78ed8e81efb91eaf2313d00 (patch)
tree2552c31c5e4a9a2173272adb344ed48afd6e6e82 /modules
parent76dfdc1b1e7a62b363954f01f71f5a1e77d5249a (diff)
luci-base: establish ubus connection before dropping privileges (#310)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/luasrc/dispatcher.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua
index 795b62bedb..a80dd706e0 100644
--- a/modules/luci-base/luasrc/dispatcher.lua
+++ b/modules/luci-base/luasrc/dispatcher.lua
@@ -371,6 +371,9 @@ function dispatch(request)
end
if track.setuser then
+ -- trigger ubus connection before dropping root privs
+ util.ubus()
+
sys.process.setuser(track.setuser)
end