diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-02-09 12:14:20 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-02-09 12:14:20 +0100 |
commit | 993cf1222998a7e3e78ed8e81efb91eaf2313d00 (patch) | |
tree | 2552c31c5e4a9a2173272adb344ed48afd6e6e82 /modules | |
parent | 76dfdc1b1e7a62b363954f01f71f5a1e77d5249a (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.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index 795b62bed..a80dd706e 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 |