From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 60EB513933E for ; Tue, 6 Jul 2021 00:25:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A59DE0AC4; Tue, 6 Jul 2021 00:25:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 10479E0AC4 for ; Tue, 6 Jul 2021 00:25:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EBF7A33BF05 for ; Tue, 6 Jul 2021 00:25:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CB17F7CE for ; Tue, 6 Jul 2021 00:25:15 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1625528452.203500a030b608538b15a4a8094de680e1937266.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts defaults/unlock-luks.sh X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 203500a030b608538b15a4a8094de680e1937266 X-VCS-Branch: master Date: Tue, 6 Jul 2021 00:25:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c77a11b9-37f0-47ef-a818-a8199761f890 X-Archives-Hash: a118b2b855d5d19615d7fac36070769e commit: 203500a030b608538b15a4a8094de680e1937266 Author: Thomas Deutschmann gentoo org> AuthorDate: Mon Jul 5 23:19:34 2021 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Mon Jul 5 23:40:52 2021 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=203500a0 initrd.scripts: openLUKS(): Reset cryptsetup_options on each iteration Fixes: a0a6d631 ("linuxrc: add kernel command-line argument to allow user to pass additional options to cryptsetup") Bug: https://bugs.gentoo.org/794817 Signed-off-by: Thomas Deutschmann gentoo.org> defaults/initrd.scripts | 6 ++++-- defaults/unlock-luks.sh | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 5ec8adb..cdee2a4 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1831,8 +1831,6 @@ openLUKS() { eval local LUKS_KEY='"${CRYPT_'${TYPE}'_KEY}"' eval local LUKS_KEYDEV='"${CRYPT_'${TYPE}'_KEYDEV}"' eval local LUKS_KEYDEV_FSTYPE='"${CRYPT_'${TYPE}'_KEYDEV_FSTYPE}"' - eval local cryptsetup_options='"${CRYPT_'${TYPE}'_OPTIONS}"' - cryptsetup_options="$(trim "${cryptsetup_options}")" eval local OPENED_LOCKFILE='"${CRYPT_'${TYPE}'_OPENED_LOCKFILE}"' local DEV_ERROR=0 KEY_ERROR=0 KEYDEV_ERROR=0 local mntkey="/mnt/key/" crypt_filter_ret= @@ -1845,6 +1843,10 @@ openLUKS() { while true do + # Reset cryptsetup_options on each iteration + eval local cryptsetup_options='"${CRYPT_'${TYPE}'_OPTIONS}"' + cryptsetup_options="$(trim "${cryptsetup_options}")" + local gpg_cmd="" if [ -e "${OPENED_LOCKFILE}" ] then diff --git a/defaults/unlock-luks.sh b/defaults/unlock-luks.sh index 2674d93..54ed1a0 100644 --- a/defaults/unlock-luks.sh +++ b/defaults/unlock-luks.sh @@ -58,6 +58,10 @@ main() { while true do + # Reset cryptsetup_options on each iteration + eval local cryptsetup_options='"${CRYPT_'${TYPE}'_OPTIONS}"' + cryptsetup_options="$(trim "${cryptsetup_options}")" + local gpg_cmd crypt_filter_ret if [ -e "${OPENED_LOCKFILE}" ]