From 993cf1222998a7e3e78ed8e81efb91eaf2313d00 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 9 Feb 2015 12:14:20 +0100 Subject: [PATCH] luci-base: establish ubus connection before dropping privileges (#310) Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/dispatcher.lua | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.25.1