diff options
author | Hugo Grostabussiat <bonstra@bonstra.fr.eu.org> | 2014-09-28 03:05:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-10-24 02:14:49 +0200 |
commit | a6fb0dc138d4e7895f8e607493279dbe4df117a1 (patch) | |
tree | b738c28ec7d2ab8bd98fd98a9dc71ff067ec3b3d /src/cryptsetup | |
parent | a2726e5cedfa5edeabd7e0784be11bc578555ac5 (diff) |
cryptsetup: Fix timeout on dm device.
Fix a bug in systemd-cryptsetup-generator which caused the drop-in
setting the job timeout for the dm device unit to be written with a
name different than the unit name.
https://bugs.freedesktop.org/show_bug.cgi?id=84409
Diffstat (limited to 'src/cryptsetup')
-rw-r--r-- | src/cryptsetup/cryptsetup-generator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index c7f30f6a15..05ceff443f 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -246,7 +246,12 @@ static int create_disk( } if (!noauto && !nofail) { - r = write_drop_in(arg_dest, name, 90, "device-timeout", + _cleanup_free_ char *dmname; + dmname = strjoin("dev-mapper-", e, ".device", NULL); + if (!dmname) + return log_oom(); + + r = write_drop_in(arg_dest, dmname, 90, "device-timeout", "# Automatically generated by systemd-cryptsetup-generator \n\n" "[Unit]\nJobTimeoutSec=0"); if (r < 0) { |