Bugzilla – Bug 967435
"systemctl reboot" doesn't restore TTY after timeout
Last modified: 2018-07-27 16:40:08 UTC
"systemctl reboot" asks the password for reboot when needed. If the user doesn't give a password for long time, systemd aborts the operation and returns to the command prompt. However, it doesn't restore the tty but keeps disabling echo for password, so the text doesn't appear on the command line any longer. After the manual tty reset, it starts working fine again.
Since it's never too late, I'll try to provide some feedback ;) This issue is still current as I can still reproduce it on latest TW. systemctl relies on "pkttyagent", a polkit agent shipped by polkit, for querying the authentication tokens when it's requested by the polkit daemon. Basically when systemctl is run, it asks to logind to reboot the system. In its turns, logind queries polkitd for the authentication tokens. For that, polkitd prompts for the password via the polkit agent (which was spawned by systemctl). All of this is done through D-Bus method calls which time out if the user doesn't provide the password in time. Apparently polkit doesn't handle the DBus method call timeout properly as it doesn't restore the tty settings when it exists. Marcus you appear to be the maintainer of polkit so I'm re-assigning this bug to you as it appears to be a polkit issue. Feel free to re-assign it back to the systemd maintainer team if I've missed something.