diff options
Diffstat (limited to 'modules/luci-base/root')
-rwxr-xr-x | modules/luci-base/root/usr/libexec/rpcd/luci | 6 | ||||
-rw-r--r-- | modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci index 8215fb95dd..ace0957f3e 100755 --- a/modules/luci-base/root/usr/libexec/rpcd/luci +++ b/modules/luci-base/root/usr/libexec/rpcd/luci @@ -685,6 +685,12 @@ local methods = { local util = require "luci.util" return { result = (os.execute(string.format("/bin/umount %s", util.shellquote(args.path))) == 0) } end + }, + + setReboot = { + call = function() + return { result = (os.execute("/sbin/reboot >/dev/null 2>&1") == 0) } + end } } diff --git a/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json b/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json index 54caa74363..f811fb99ea 100644 --- a/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json +++ b/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json @@ -30,6 +30,8 @@ "/etc/filesystems": [ "read" ], "/etc/rc.local": [ "read" ], "/etc/sysupgrade.conf": [ "read" ], + "/etc/passwd": [ "read" ], + "/etc/group": [ "read" ], "/proc/filesystems": [ "read" ], "/proc/mtd": [ "read" ], "/proc/partitions": [ "read" ], @@ -67,7 +69,7 @@ "ubus": { "file": [ "write", "remove", "exec" ], "iwinfo": [ "scan" ], - "luci": [ "setInitAction", "setLocaltime", "setPassword", "setBlockDetect", "setUmount" ], + "luci": [ "setInitAction", "setLocaltime", "setPassword", "setBlockDetect", "setUmount", "setReboot" ], "uci": [ "add", "apply", "confirm", "delete", "order", "set", "rename" ] }, "uci": [ "*" ] |