luci-app-lxc: add permission to set lxc options#8531
luci-app-lxc: add permission to set lxc options#8531systemcrash merged 1 commit intoopenwrt:masterfrom
Conversation
Add set permission in acl.d file for luci-app-lxc to allow users to set lxc options in luci-app-lxc. (considering that user has write permission for this app) Signed-off-by: mdevolde <martin.devolder2@gmail.com>
Failed checksIssues marked with an ❌ are failing checks. Commit 9220734
For more details, see the full job log. Something broken? Consider providing feedback. |
|
Am I right in thinking that the uci set command is now globally accessible via this app/user combo (e.g. uci set any-app any-property is possible)? |
|
@systemcrash the curious thing is the |
|
I forgot to precise but the other user trying to edit the lxc params has these permissions: And this is the {
"luci-app-wol": {
"description": "Grant access to wake-on-lan executables",
"read": {
"ubus": {
"luci.wol": [ "stat" ],
"luci-rpc": [ "getHostHints", "getNetworkDevices" ]
},
"uci": [ "luci-wol" ]
},
"write": {
"ubus": {
"luci.wol": [ "exec" ],
"uci": [ "add", "set", "delete", "order" ]
},
"uci": [ "luci-wol" ]
}
}
}So, he has uci |
|
Ok I figured it out. Response to Response to Diff: HTTP/1.1 200 OK
Connection: Keep-Alive
Keep-Alive: timeout=20
Content-Type: application/json
Content-Length: 39
- [{"jsonrpc":"2.0","id":7,"result":[0]}]
+ [{"jsonrpc":"2.0","id":7,"result":[6]}]The difference is the result code. 6 is 403 Permission denied: So, a user with this permission can't perform |
|
@systemcrash do you need any other information/test about these permissions? |
|
I guess there's no other reasonable way around this. |



Signed-off-by: <my@email.address>row (viagit commit --signoff)<package name>: titlefirst line subject for packagesPKG_VERSIONin the MakefileActual behavior:

New behavior (working set/save):

Add set permission in
acl.dfile forluci-app-lxcto allow users to set lxc options inluci-app-lxc.To perform my tests, I considered a user with these permissions in
/etc/config/rpcd:Actually, users with these permissions are able to create containers and perform actions on them, but are not able to edit the basic settings. That's the purpose of this PR.