From 17fa29391f769426876bd51f5f6f992dc23017fd Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 15 Nov 2015 18:51:06 +0100 Subject: [PATCH] Don't timeout after 90 seconds when no password was entered for cryptsetup devices Closes: #802897 --- debian/changelog | 2 ++ .../cryptsetup-Fix-timeout-on-dm-device.patch | 33 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 36 insertions(+) create mode 100644 debian/patches/cryptsetup-Fix-timeout-on-dm-device.patch diff --git a/debian/changelog b/debian/changelog index f4e83adf3..f97f133e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ systemd (215-17+deb8u3) UNRELEASED; urgency=medium * Fix namespace breakage due to incorrect path sorting. (Closes: #787758) + * Don't timeout after 90 seconds when no password was entered for cryptsetup + devices. (Closes: #802897) -- Michael Biebl Mon, 16 Nov 2015 17:49:20 +0100 diff --git a/debian/patches/cryptsetup-Fix-timeout-on-dm-device.patch b/debian/patches/cryptsetup-Fix-timeout-on-dm-device.patch new file mode 100644 index 000000000..f7e6ff672 --- /dev/null +++ b/debian/patches/cryptsetup-Fix-timeout-on-dm-device.patch @@ -0,0 +1,33 @@ +From: Hugo Grostabussiat +Date: Sun, 28 Sep 2014 03:05:41 +0200 +Subject: 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 + +(cherry-picked from commit a6fb0dc138d4e7895f8e607493279dbe4df117a1) +--- + src/cryptsetup/cryptsetup-generator.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c +index 3233e15..de91a6f 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) { diff --git a/debian/patches/series b/debian/patches/series index 7282f4087..c49bb3f2b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -152,6 +152,7 @@ manager-do-not-print-anything-while-passwords-are-be.patch manager-pass-correct-errno-to-strerror.patch shared-add-path_compare-an-ordering-path-comparison.patch core-namespace-fix-path-sorting.patch +cryptsetup-Fix-timeout-on-dm-device.patch ## Debian specific patches: Add-back-support-for-Debian-specific-config-files.patch -- GitLab