lock primitives: power-from-lock, login1 polkit rule, gesture rail progress
seat0-active polkit rule so power off/reboot/suspend stop returning challenge into a session with no polkit agent on the lock surface. Lock-surface buttons stay gated behind allowPowerFromLock (opt-in) and requirePasswordToPower. SystemGestureRail progressive gesture + mission control nav flag.
This commit is contained in:
parent
8d661d2352
commit
5cb1be06cd
10 changed files with 250 additions and 47 deletions
|
|
@ -8,7 +8,7 @@ pkgdesc="Sovereign agent substrate — server, TUI, surfaces"
|
|||
arch=('aarch64' 'x86_64')
|
||||
url="https://github.com/Fimeg/souveraine"
|
||||
license=('MIT')
|
||||
depends=('gcc-libs')
|
||||
depends=('gcc-libs' 'polkit')
|
||||
makedepends=('cargo' 'git')
|
||||
options=('!lto')
|
||||
|
||||
|
|
@ -44,5 +44,12 @@ package() {
|
|||
install -Dm644 packaging/arch/souveraine.sysusers \
|
||||
"$pkgdir/usr/lib/sysusers.d/souveraine.conf"
|
||||
|
||||
# Let the active local session power off / reboot / suspend / hibernate
|
||||
# without an interactive polkit challenge — otherwise the lock surface
|
||||
# (no agent above session lock) silently no-ops these and every shutdown
|
||||
# is a fastboot hard-reboot.
|
||||
install -Dm644 packaging/arch/souveraine-login1.rules \
|
||||
"$pkgdir/etc/polkit-1/rules.d/49-souveraine-login1.rules"
|
||||
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
|
|
|||
31
packaging/arch/souveraine-login1.rules
Normal file
31
packaging/arch/souveraine-login1.rules
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
// Souveraine — let the active local session power off, reboot, suspend, and
|
||||
// hibernate without an interactive polkit challenge.
|
||||
//
|
||||
// Without this, login1 returns 'challenge' for CanPowerOff/CanReboot on
|
||||
// every call, and the session has no usable polkit agent on the lock
|
||||
// surface, so power off / reboot silently no-op'd and every shutdown was a
|
||||
// fastboot hard-reboot.
|
||||
//
|
||||
// Doctrine boundary: this grants every process in the authenticated active
|
||||
// local seat0 session unchallenged power state. That authority remains while
|
||||
// the session is screen-locked; a Wayland lock is not a new logind session.
|
||||
// Config.options.lock.security.allowPowerFromLock (default false, opt-in)
|
||||
// gates only Souveraine's lock-surface buttons, and requirePasswordToPower can
|
||||
// arm those buttons for PIN confirmation. They do not constrain arbitrary
|
||||
// local D-Bus clients. Remote/SSH sessions are NOT granted.
|
||||
//
|
||||
// Mirrors the default rule every desktop (GNOME/KDE/Phosh) ships.
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id === "org.freedesktop.login1.power-off" ||
|
||||
action.id === "org.freedesktop.login1.power-off-multiple-sessions" ||
|
||||
action.id === "org.freedesktop.login1.reboot" ||
|
||||
action.id === "org.freedesktop.login1.reboot-multiple-sessions" ||
|
||||
action.id === "org.freedesktop.login1.suspend" ||
|
||||
action.id === "org.freedesktop.login1.suspend-multiple-sessions" ||
|
||||
action.id === "org.freedesktop.login1.hibernate" ||
|
||||
action.id === "org.freedesktop.login1.hibernate-multiple-sessions") &&
|
||||
subject.active && subject.local && subject.seat === "seat0") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
Loading…
Reference in a new issue