-
Notifications
You must be signed in to change notification settings - Fork 2.9k
luci-mod-system: permit sysupgrade --create-backup over rpcd #8947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -176,7 +176,8 @@ | |
| "/proc/mtd": [ "read" ], | ||
| "/proc/partitions": [ "read" ], | ||
| "/proc/sys/kernel/hostname": [ "read" ], | ||
| "/sbin/sysupgrade --list-backup": [ "exec" ] | ||
| "/sbin/sysupgrade --list-backup": [ "exec" ], | ||
| "/sbin/sysupgrade --create-backup -": [ "exec" ] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ACL string itself looks right: rpcd checks the bare executable first and then What I can't square is the transport.
That limit is precisely why cgi-io exists in the first place — So: does openwrt/cgi-io#6 still spawn and stream the child's stdout to the HTTP client itself, using rpcd only for the privileged spawn / ACL check, or does it go through The same question applies to the Generated by Claude Code |
||
| }, | ||
| "ubus": { | ||
| "file": [ "exec", "read", "stat" ] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the PR title and description only cover the
luci-mod-systembackup grant; this second commit addsluci-mod-statusentries that aren't mentioned anywhere in the body. Worth widening the title/description (or splitting), so the merge doesn't look like it touched an unrelated module.For the record the grant itself checks out: nftables.js:163-173`` probes
/usr/sbin/iptables-legacy-savewith `fs.stat()` (covered by the `/*: [ "list" ]` grant in `luci-base`) and then `fs.exec_direct()`s the bare path with no params, which matches the bare-executable check in rpcd. Both alternatives are real install paths (iptables/Makefile:65 and :485), and although they are symlinks to `xtables-legacy-multi`, rpcd's exec path only canonicalizes textually and never resolves symlinks, so the grant on the link name is the correct one.Generated by Claude Code