luci-app-wol: replace fs.stat/exec with safe RPC backend, fix ACLs
authormdevolde <[email protected]>
Mon, 24 Nov 2025 15:12:23 +0000 (16:12 +0100)
committerPaul Donald <[email protected]>
Wed, 26 Nov 2025 23:07:15 +0000 (00:07 +0100)
commitbf7d15af13a9610512e585b45fe3c5bd1aebf285
treef663068479fbb5c799bc79db6db13260a29126cf
parentcf3d8cdb27abadab2d2d46e7fa38bb9732e7190f
luci-app-wol: replace fs.stat/exec with safe RPC backend, fix ACLs

fs.stat() and fs.exec() require broad rpcd permissions (ubus file.*) which
prevent luci-app-wol from working for restricted users and expose more
access than necessary.

This introduces a dedicated RPC backend (luci.wol) providing safe stat/exec
wrappers for etherwake and wakeonlan, and simplifies ACLs to only allow
these two RPC calls.

Also adds the missing 'getNetworkDevices' ACL required by DeviceSelect.

Signed-off-by: Martin Devolder <[email protected]>
applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js
applications/luci-app-wol/root/usr/share/rpcd/acl.d/luci-app-wol.json
applications/luci-app-wol/root/usr/share/rpcd/ucode/luci.wol [new file with mode: 0644]