feat(session): clear the one-shot autologin when a launch is killed

A launch stopped before its cleanup left the drop-in armed, so the next boot
skipped the password prompt without anyone noticing. Mark what the tool writes,
create a transient unit whose ExecStopPost removes it on stop, timeout and
shutdown, and clean up on SIGTERM/SIGINT/SIGHUP in the helper.
This commit is contained in:
BlackAngelTV committed 2026-11-16 08:25:57 +01:00
1 parent 939f21a946
commit 9dac8ee088
3 files changed
+238 -11

No files matched your search

+5
View File
@@ -826,5 +826,10 @@ int main(int argc, char** argv) {
if (argc == 4 && std::string(argv[1]) == "--privileged-launch") {
return fws::runLaunchHelper(argv[2], argv[3]);
}
// Same re-entry for removing a drop-in, which the watchdog unit runs as root
// when it notices a launch that never cleaned up.
if (argc == 2 && std::string(argv[1]) == "--privileged-cleanup") {
return fws::runAutologinCleanup();
}
return ManagerWindow::run(argc, argv);
}