mount/generators: do not make unit wanted by its device unit
authorTom Yan <tom.ty89@gmail.com>
Wed, 9 Jan 2019 15:35:24 +0000 (23:35 +0800)
committerMichael Biebl <biebl@debian.org>
Wed, 16 Oct 2019 13:24:54 +0000 (14:24 +0100)
commitfb8a3b3fb4205405c09214b5cda5453903f434fb
treeb587f0ce80fa5ec232f201b8df9bbf1264b99cac
parent5fc187c9bc5bfa58ba75775154d5d4f29f2e8ded
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)).

(cherry picked from commit 142b8142d7bb84f07ac33fc00527a4d48ac8ef9f)

Gbp-Pq: Name mount-generators-do-not-make-unit-wanted-by-its-device-un.patch
src/core/mount.c
src/cryptsetup/cryptsetup-generator.c