Skip to content

luci-mod-system, luci-mod-status: permit sysupgrade --create-backup and legacy iptables-save - #8947

Open
JuliusBairaktaris wants to merge 2 commits into
openwrt:masterfrom
JuliusBairaktaris:backup-create-acl
Open

JuliusBairaktaris wants to merge 2 commits into
openwrt:masterfrom
JuliusBairaktaris:backup-create-acl

Conversation

@JuliusBairaktaris

@JuliusBairaktaris JuliusBairaktaris commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Two ACL fixes.

luci-mod-status: the firewall status page runs iptables-legacy-save and
ip6tables-legacy-save when they exist, but only the non-legacy commands are
in the ACL. cgi-io refuses the call, LuCI turns the error into an empty string,
and the legacy tables show up empty. This adds the legacy commands. It fixes
current master on its own. I found this by reading the code and have not
reproduced it on a device.

luci-mod-system: adds /sbin/sysupgrade --create-backup - to the backup ACL.
It only takes effect once openwrt/cgi-io#6 runs the backup through rpcd (with
openwrt/rpcd#40), which is needed for a non-root uhttpd
(openwrt/openwrt#24740).

Should the luci-mod-status commit go in now and the luci-mod-system one wait
for cgi-io#6?

I used AI to help me write the change.

Copilot AI lite review requested due to automatic review settings August 15, 2026 07:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@JuliusBairaktaris

Copy link
Copy Markdown
Contributor Author

@jow- — review ping.

One-line ACL grant permitting exactly /sbin/sysupgrade --create-backup -, in the same luci-mod-system-flash read section as the existing --list-backup grant. rpcd matches the bare executable first and then executable + " " + each param, so this is an exact match with no glob metacharacters.

Needed by openwrt/cgi-io#6, which is in turn needed by openwrt/openwrt#24558.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 new commits. Both commit messages match their diffs, both files stay valid JSON, and the ACL strings are in the correct read sections. Two inline notes — the main one is a question about whether rpcd's file.exec can actually carry a backup tarball, since it is fully buffered and returns stdout as a NUL-terminated string.


Generated by Claude Code

@JuliusBairaktaris JuliusBairaktaris changed the title luci-mod-system: permit sysupgrade --create-backup over rpcd luci-mod-system, luci-mod-status: permit sysupgrade --create-backup and legacy iptables-save Sep 7, 2026

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 new commits; no new issues found.


Generated by Claude Code

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 new commits; no new issues found.


Generated by Claude Code

openwrt/cgi-io#6 moves archive creation to rpcd's file exec method so
that it keeps working when uhttpd runs as a non-root user, and
openwrt/rpcd#40 returns the child's stdout as a file descriptor so the
archive is streamed rather than buffered into the ubus reply. rpcd
matches the requested command against the caller's session ACL, so the
grant names the exact command line.

Depends on openwrt/cgi-io#6 and openwrt/rpcd#40.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Only the non-legacy iptables-save pair is in the session ACL, but the
firewall status page runs the legacy pair when those binaries exist.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 new commits; no new issues found.


Generated by Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants