summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Heiko Becker <heirecka@exherbo.org> 2017-10-02 21:27:02 +0200
committerAvatar Heiko Becker <heirecka@exherbo.org> 2017-10-03 12:11:51 +0200
commit3a229501d0726ed77bfecd2d91b4091dd390254a (patch)
treede64640b63e72940e41fca27baba353096ab1fe9
parent9e0121b45f3fb85a6454ffb3958372c3ad82f0e6 (diff)
downloadarbor-3a229501d0726ed77bfecd2d91b4091dd390254a.tar.gz
arbor-3a229501d0726ed77bfecd2d91b4091dd390254a.tar.xz
systemd: Fix booting with an encrypted root fs
-rw-r--r--packages/sys-apps/systemd/files/patches-234/0001-cryptsetup-fix-infinite-timeout-6486.patch45
-rw-r--r--packages/sys-apps/systemd/systemd-234-r5.exheres-0 (renamed from packages/sys-apps/systemd/systemd-234-r4.exheres-0)0
2 files changed, 45 insertions, 0 deletions
diff --git a/packages/sys-apps/systemd/files/patches-234/0001-cryptsetup-fix-infinite-timeout-6486.patch b/packages/sys-apps/systemd/files/patches-234/0001-cryptsetup-fix-infinite-timeout-6486.patch
new file mode 100644
index 0000000..5e9e13f
--- /dev/null
+++ b/packages/sys-apps/systemd/files/patches-234/0001-cryptsetup-fix-infinite-timeout-6486.patch
@@ -0,0 +1,45 @@
+Upstream: yes
+
+From 0864d311766498563331f486909a0d950ba7de87 Mon Sep 17 00:00:00 2001
+From: Andrew Soutar <andrew@andrewsoutar.com>
+Date: Mon, 31 Jul 2017 02:19:16 -0400
+Subject: [PATCH] cryptsetup: fix infinite timeout (#6486)
+
+0004f698d causes `arg_timeout` to be infinity instead of 0 when timeout=0. The
+logic here now matches this change.
+
+Fixes #6381
+---
+ src/cryptsetup/cryptsetup.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
+index 3b4c08616..08ed7e53b 100644
+--- a/src/cryptsetup/cryptsetup.c
++++ b/src/cryptsetup/cryptsetup.c
+@@ -56,7 +56,7 @@ static bool arg_tcrypt_veracrypt = false;
+ static char **arg_tcrypt_keyfiles = NULL;
+ static uint64_t arg_offset = 0;
+ static uint64_t arg_skip = 0;
+-static usec_t arg_timeout = 0;
++static usec_t arg_timeout = USEC_INFINITY;
+
+ /* Options Debian's crypttab knows we don't:
+
+@@ -670,10 +670,10 @@ int main(int argc, char *argv[]) {
+ if (arg_discards)
+ flags |= CRYPT_ACTIVATE_ALLOW_DISCARDS;
+
+- if (arg_timeout > 0)
+- until = now(CLOCK_MONOTONIC) + arg_timeout;
+- else
++ if (arg_timeout == USEC_INFINITY)
+ until = 0;
++ else
++ until = now(CLOCK_MONOTONIC) + arg_timeout;
+
+ arg_key_size = (arg_key_size > 0 ? arg_key_size : (256 / 8));
+
+--
+2.14.2
+
diff --git a/packages/sys-apps/systemd/systemd-234-r4.exheres-0 b/packages/sys-apps/systemd/systemd-234-r5.exheres-0
index 747877e..747877e 100644
--- a/packages/sys-apps/systemd/systemd-234-r4.exheres-0
+++ b/packages/sys-apps/systemd/systemd-234-r5.exheres-0