]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
emergency: make sure console password agents don't interfere with the emergency shell
authorFranck Bui <fbui@suse.com>
Tue, 25 Sep 2018 13:25:08 +0000 (15:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Sep 2018 16:13:32 +0000 (18:13 +0200)
If for any reason local-fs.target fails at startup while a password is
requested by systemd-cryptsetup@.service, we end up with the emergency shell
competing with systemd-ask-password-console.service for the console.

This patch makes sure that:

 - systemd-ask-password-console.service is stopped before entering in emergency
   mode so it won't make any access to the console while the emergency shell is
   running.

 - systemd-ask-password-console.path is also stopped so any attempts to restart
   systemd-cryptsetup in the emergency shell won't restart
   systemd-ask-password-console.service and kill the emergency shell.

 - systemd-ask-password-wall.path is stopped so
   systemd-ask-password-wall.service won't be started as this service pulls
   the default dependencies in.

Fixes: #10131
units/systemd-ask-password-console.path
units/systemd-ask-password-console.service.in
units/systemd-ask-password-wall.path

index d686ca634c4c030f3350ade929025ecb6dbff5df..248d597540e06e9dfa4c2b368091b19a0b02dd67 100644 (file)
@@ -11,7 +11,7 @@
 Description=Dispatch Password Requests to Console Directory Watch
 Documentation=man:systemd-ask-password-console.service(8)
 DefaultDependencies=no
-Conflicts=shutdown.target
+Conflicts=shutdown.target emergency.service
 After=plymouth-start.service
 Before=paths.target shutdown.target cryptsetup.target
 ConditionPathExists=!/run/plymouth/pid
index 6923d68df0730fe9a840617dfe7c3aaa63082d85..60fa7c320009cae82d764499150d3156d37fee91 100644 (file)
@@ -11,7 +11,7 @@
 Description=Dispatch Password Requests to Console
 Documentation=man:systemd-ask-password-console.service(8)
 DefaultDependencies=no
-Conflicts=shutdown.target
+Conflicts=shutdown.target emergency.service
 After=plymouth-start.service systemd-vconsole-setup.service
 Before=shutdown.target
 ConditionPathExists=!/run/plymouth/pid
index 5a356b97d0a6653c39862216352dc523d2b68894..193a9b311e0581a36d04b4b940aed4d85fb715d0 100644 (file)
@@ -11,7 +11,7 @@
 Description=Forward Password Requests to Wall Directory Watch
 Documentation=man:systemd-ask-password-console.service(8)
 DefaultDependencies=no
-Conflicts=shutdown.target
+Conflicts=shutdown.target emergency.service
 Before=paths.target shutdown.target cryptsetup.target
 
 [Path]