summaryrefslogtreecommitdiffstats
path: root/src/cryptsetup
diff options
context:
space:
mode:
authorTom Yan <tom.ty89@gmail.com>2019-01-09 16:35:24 +0100
committerTom Yan <tom.ty89@gmail.com>2019-02-14 17:16:54 +0100
commit142b8142d7bb84f07ac33fc00527a4d48ac8ef9f (patch)
treecf28fed32ed37bbf553752b4862f191c7f4ec4d6 /src/cryptsetup
parentMerge pull request #11714 from poettering/final-news-241 (diff)
downloadsystemd-142b8142d7bb84f07ac33fc00527a4d48ac8ef9f.tar.xz
systemd-142b8142d7bb84f07ac33fc00527a4d48ac8ef9f.zip
mount/generators: do not make unit wanted by its device unit
As device units will be reloaded by systemd whenever the corresponding device generates a "changed" event, if the mount unit / cryptsetup service is wanted by its device unit, the former can be restarted by systemd unexpectedly after the user stopped them explicitly. It is not sensible at all and can be considered dangerous. Neither is the behaviour conventional (as `auto` in fstab should only affect behaviour on boot and `mount -a`) or ever documented at all (not even in systemd, see systemd.mount(5) and crypttab(5)).
Diffstat (limited to 'src/cryptsetup')
-rw-r--r--src/cryptsetup/cryptsetup-generator.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
index 8759a26148..ea18e84f31 100644
--- a/src/cryptsetup/cryptsetup-generator.c
+++ b/src/cryptsetup/cryptsetup-generator.c
@@ -287,10 +287,6 @@ static int create_disk(
return log_error_errno(r, "Failed to write unit file %s: %m", n);
if (!noauto) {
- r = generator_add_symlink(arg_dest, d, "wants", n);
- if (r < 0)
- return r;
-
r = generator_add_symlink(arg_dest,
netdev ? "remote-cryptsetup.target" : "cryptsetup.target",
nofail ? "wants" : "requires", n);