luci-app-statistics: add missing ACL rules
authorJo-Philipp Wich <jo@mein.io>
Thu, 13 Feb 2020 18:33:05 +0000 (19:33 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 13 Feb 2020 18:37:26 +0000 (19:37 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-statistics/root/usr/share/rpcd/acl.d/luci-app-statistics.json [new file with mode: 0644]

diff --git a/applications/luci-app-statistics/root/usr/share/rpcd/acl.d/luci-app-statistics.json b/applications/luci-app-statistics/root/usr/share/rpcd/acl.d/luci-app-statistics.json
new file mode 100644 (file)
index 0000000..2529fca
--- /dev/null
@@ -0,0 +1,23 @@
+{
+       "luci-app-statistics": {
+               "description": "Grant access to statistics resources",
+               "read": {
+                       "cgi-io": [ "read", "exec" ],
+                       "file": {
+                               "/etc/filesystems": [ "read" ],
+                               "/etc/group": [ "read" ],
+                               "/etc/passwd": [ "read" ],
+                               "/proc/filesystems": [ "read" ],
+                               "/proc/interrupts": [ "read" ],
+                               "/proc/mounts": [ "read" ],
+                               "/proc/partitions": [ "read" ],
+                               "/proc/sys/kernel/hostname": [ "read" ],
+                               "/usr/bin/rrdtool graph - -a PNG *": [ "exec" ],
+                               "/usr/sbin/iptables-save": [ "exec" ],
+                               "/usr/sbin/ip6tables-save": [ "exec" ],
+                               "/usr/sbin/sensors -j": [ "exec" ],
+                               "/usr/share/luci/statistics/plugins/*.json": [ "read" ]
+                       }
+               }
+       }
+}