summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2018-09-25 15:25:08 +0200
committerLennart Poettering <lennart@poettering.net>2018-09-26 18:13:32 +0200
commit4885626b566c4cd97f63c396bc7200ff709f9baf (patch)
treee0981b2c794f819141622a25ce26a6a4ffdcb3fe /units
parent89f180201cd8c0f3ce5cb6e8dd7e2b3cbcf71527 (diff)
downloadsystemd-4885626b566c4cd97f63c396bc7200ff709f9baf.tar.gz
emergency: make sure console password agents don't interfere with the emergency shell
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
Diffstat (limited to 'units')
-rw-r--r--units/systemd-ask-password-console.path2
-rw-r--r--units/systemd-ask-password-console.service.in2
-rw-r--r--units/systemd-ask-password-wall.path2
3 files changed, 3 insertions, 3 deletions
diff --git a/units/systemd-ask-password-console.path b/units/systemd-ask-password-console.path
index d686ca634c..248d597540 100644
--- a/units/systemd-ask-password-console.path
+++ b/units/systemd-ask-password-console.path
@@ -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
diff --git a/units/systemd-ask-password-console.service.in b/units/systemd-ask-password-console.service.in
index 6923d68df0..60fa7c3200 100644
--- a/units/systemd-ask-password-console.service.in
+++ b/units/systemd-ask-password-console.service.in
@@ -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
diff --git a/units/systemd-ask-password-wall.path b/units/systemd-ask-password-wall.path
index 5a356b97d0..193a9b311e 100644
--- a/units/systemd-ask-password-wall.path
+++ b/units/systemd-ask-password-wall.path
@@ -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]