summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-07-29 00:28:49 +0800
committertranch <tranch.xiao@gmail.com>2026-07-29 00:28:49 +0800
commitc1f3f42c14e5bbf1c8181d1469ac58f1d9f7ebf3 (patch)
treeb7cfe9b20909f656284442a30f2570da5d14146d
parent6aee80a6d0e7a627f7966c8b00fc3acf1264b72b (diff)
downloadAeroCore-OS-c1f3f42c14e5bbf1c8181d1469ac58f1d9f7ebf3.tar.gz
AeroCore-OS-c1f3f42c14e5bbf1c8181d1469ac58f1d9f7ebf3.zip
Allow live user to launch installer
Authorize only the local active liveuser session for Anaconda's specific polkit action, avoiding the transient password prompt. Validate installer polkit rule syntax in the pull request workflow.
-rw-r--r--.github/workflows/validate-installer-iso.yml6
-rw-r--r--installer/system_files/overrides/etc/polkit-1/rules.d/10-aerocore-liveinst.rules10
2 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/validate-installer-iso.yml b/.github/workflows/validate-installer-iso.yml
index 131ad5b..391afd8 100644
--- a/.github/workflows/validate-installer-iso.yml
+++ b/.github/workflows/validate-installer-iso.yml
@@ -38,3 +38,9 @@ jobs:
bash -n "$script"
done
bash -n system_files/usr/libexec/aerocore-instruments-setup
+
+ - name: Validate installer polkit rules
+ run: |
+ for rule in installer/system_files/overrides/etc/polkit-1/rules.d/*.rules; do
+ node --check < "$rule"
+ done
diff --git a/installer/system_files/overrides/etc/polkit-1/rules.d/10-aerocore-liveinst.rules b/installer/system_files/overrides/etc/polkit-1/rules.d/10-aerocore-liveinst.rules
new file mode 100644
index 0000000..0ebcfdd
--- /dev/null
+++ b/installer/system_files/overrides/etc/polkit-1/rules.d/10-aerocore-liveinst.rules
@@ -0,0 +1,10 @@
+// The installer action is privileged by design. Allow only the local,
+// active Live ISO session to launch it without a transient password prompt.
+polkit.addRule(function(action, subject) {
+ if (action.id === "org.fedoraproject.pkexec.liveinst" &&
+ subject.user === "liveuser" &&
+ subject.local === true &&
+ subject.active === true) {
+ return polkit.Result.YES;
+ }
+});