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:
parent
6619e66fc9
commit
81e80c4b87
2 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
8
modules/luci-base/root/usr/share/acl.d/luci-base.json
Normal file
8
modules/luci-base/root/usr/share/acl.d/luci-base.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"user": "nobody",
|
||||
"access": {
|
||||
"system": {
|
||||
"methods": [ "board", "info" ]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue