luci-base: properly handle ubus connections for non-root (#570, #571)

Instead of relying on the connect-before-setuid hack, ship a proper
acl definition file whitelisting the procedures that LuCI requires
on its non-root pages.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
Jo-Philipp Wich 2015-12-09 20:32:12 +01:00
parent 6619e66fc9
commit 81e80c4b87
2 changed files with 8 additions and 3 deletions

View file

@ -402,9 +402,6 @@ function dispatch(request)
end
if track.setuser then
-- trigger ubus connection before dropping root privs
util.ubus()
sys.process.setuser(track.setuser)
end

View file

@ -0,0 +1,8 @@
{
"user": "nobody",
"access": {
"system": {
"methods": [ "board", "info" ]
}
}
}