Skip to content

Commit fd83043

Browse files
committed
luci-app-*: migrate LogreadBox consumers to use new permission ACLs
"ubus": { "log": [ "read" ] } Signed-off-by: Paul Donald <[email protected]>
1 parent b59e51a commit fd83043

File tree

6 files changed

+34
-43
lines changed

6 files changed

+34
-43
lines changed
Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
{
2-
"luci-app-acme": {
3-
"description": "Grant UCI access for luci-app-acme",
4-
"read": {
5-
"cgi-io": [ "exec" ],
6-
"file": {
7-
"/usr/lib/acme/client/dnsapi": [ "list" ],
8-
"/proc/sys/kernel/hostname": [ "read" ],
9-
"/etc/ssl/acme": [ "list" ],
10-
"/usr/libexec/acmesh-dnsinfo.sh": [ "exec" ],
11-
"/sbin/logread -e acme": [ "exec" ],
12-
"/usr/sbin/logread -e acme": [ "exec" ]
13-
},
14-
"uci": [ "acme", "ddns" ]
15-
},
16-
"write": {
17-
"uci": [ "acme" ]
18-
}
19-
}
2+
"luci-app-acme": {
3+
"description": "Grant UCI access for luci-app-acme",
4+
"read": {
5+
"cgi-io": [ "exec" ],
6+
"file": {
7+
"/usr/lib/acme/client/dnsapi": [ "list" ],
8+
"/proc/sys/kernel/hostname": [ "read" ],
9+
"/etc/ssl/acme": [ "list" ],
10+
"/usr/libexec/acmesh-dnsinfo.sh": [ "exec" ],
11+
},
12+
"uci": [ "acme", "ddns" ],
13+
"ubus": {
14+
"log": [ "read" ]
15+
}
16+
},
17+
"write": {
18+
"uci": [ "acme" ]
19+
}
20+
}
2021
}

applications/luci-app-adblock/root/usr/share/rpcd/acl.d/luci-app-adblock.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@
3333
"/var/run/adb_runtime.json": [
3434
"read"
3535
],
36-
"/sbin/logread -e adblock-": [
37-
"exec"
38-
],
39-
"/usr/sbin/logread -e adblock-": [
40-
"exec"
41-
],
4236
"/etc/init.d/adblock reload": [
4337
"exec"
4438
],
@@ -61,6 +55,9 @@
6155
"exec"
6256
]
6357
},
58+
"ubus": {
59+
"log": [ "read" ]
60+
},
6461
"uci": [
6562
"adblock"
6663
]

applications/luci-app-banip/root/usr/share/rpcd/acl.d/luci-app-banip.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,6 @@
3030
"/var/run/banip.lock": [
3131
"read"
3232
],
33-
"/sbin/logread -e banIP-": [
34-
"exec"
35-
],
36-
"/usr/sbin/logread -e banIP-": [
37-
"exec"
38-
],
39-
"/sbin/logread -e banIP/": [
40-
"exec"
41-
],
42-
"/usr/sbin/logread -e banIP/": [
43-
"exec"
44-
],
4533
"/usr/sbin/nft -tj list sets": [
4634
"exec"
4735
],
@@ -70,6 +58,9 @@
7058
"exec"
7159
]
7260
},
61+
"ubus": {
62+
"log": [ "read" ]
63+
},
7364
"uci": [
7465
"banip"
7566
]

applications/luci-app-clamav/root/usr/share/rpcd/acl.d/luci-app-clamav.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
"description": "Grant UCI access for luci-app-clamav",
44
"read": {
55
"file": [ "/tmp/*" ],
6+
"ubus": {
7+
"log": [ "read" ]
8+
},
69
"uci": [ "clamav", "clamav-milter", "freshclam" ]
710
},
811
"write": {
912
"file": {
1013
"/etc/init.d/clamav *": [ "exec" ],
1114
"/etc/init.d/clamav-milter *": [ "exec" ],
12-
"/etc/init.d/freshclam *": [ "exec" ],
13-
"/sbin/logread -e clamav": [ "exec" ],
14-
"/usr/sbin/logread -e clamav": [ "exec" ]
15+
"/etc/init.d/freshclam *": [ "exec" ]
1516
},
1617
"uci": [ "clamav", "clamav-milter", "freshclam" ]
1718
}

applications/luci-app-nextdns/root/usr/share/rpcd/acl.d/luci-app-nextdns.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"luci-app-nextdns": {
33
"description": "Grant logread access to LuCI app nextdns",
44
"read": {
5-
"file": {
6-
"/sbin/logread": [ "exec" ]
5+
"ubus": {
6+
"log": [ "read" ]
77
},
88
"uci": [ "nextdns" ]
99
},

applications/luci-app-travelmate/root/usr/share/rpcd/acl.d/luci-app-travelmate.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
"/var/run/travelmate.scan": [ "read" ],
1616
"/var/state/travelmate.refresh": [ "read" ],
1717
"/tmp/trm_runtime.json": [ "read" ],
18-
"/sbin/logread -e trm-": [ "exec" ],
19-
"/usr/sbin/logread -e trm-": [ "exec" ],
2018
"/sbin/ifup *": [ "exec" ],
2119
"/etc/init.d/travelmate start" : [ "exec" ],
2220
"/etc/init.d/travelmate stop" : [ "exec" ],
2321
"/etc/init.d/travelmate setup [0-9a-z_]* [0-9a-z_]* [0-9]*" : [ "exec" ],
2422
"/etc/init.d/travelmate scan radio[0-1]" : [ "exec" ]
2523
},
24+
"ubus": {
25+
"log": [ "read" ]
26+
},
2627
"uci": [ "travelmate", "wireless" ]
2728
}
2829
}

0 commit comments

Comments
 (0)