firewall: Introduce component for local service protection

- Automatically handle a setup of the component getting added to an existing
app.

Tests:

- Run unit tests

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2022-12-05 20:46:49 -05:00
1 parent 2240f7a151
commit 4bf347dbe3
6 files changed
+161 -3

No files matched your search

@@ -9,7 +9,9 @@ https://davidz25.blogspot.com/2012/06/authorization-rules-in-polkit.html
polkit.addRule(function(action, subject) {
if ((action.id == "org.fedoraproject.FirewallD1.config.info" ||
action.id == "org.fedoraproject.FirewallD1.config") &&
action.id == "org.fedoraproject.FirewallD1.config" ||
action.id == "org.fedoraproject.FirewallD1.direct.info" ||
action.id == "org.fedoraproject.FirewallD1.direct") &&
subject.user == "plinth") {
return polkit.Result.YES;
}
@@ -1,4 +1,4 @@
[Allow FreedomBox to manage firewalld]
Identity=unix-user:plinth
Action=org.fedoraproject.FirewallD1.config.info;org.fedoraproject.FirewallD1.config
Action=org.fedoraproject.FirewallD1.config.info;org.fedoraproject.FirewallD1.config;org.fedoraproject.FirewallD1.direct.info;org.fedoraproject.FirewallD1.direct;
ResultAny=yes