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:
3 files changed
+238
-11
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user