diff --git a/0011-ignore-empty-and-comment-lines-in-crypttab.patch b/0011-ignore-empty-and-comment-lines-in-crypttab.patch new file mode 100644 index 0000000..a92cb31 --- /dev/null +++ b/0011-ignore-empty-and-comment-lines-in-crypttab.patch @@ -0,0 +1,16 @@ +--- clevis-18.ori/src/luks/clevis-luks-common-functions.in 2023-01-12 11:00:00.927790464 +0100 ++++ clevis-18/src/luks/clevis-luks-common-functions.in 2023-01-12 11:05:53.528590215 +0100 +@@ -418,7 +418,12 @@ + clevis_devices= + + # Build list of devices to unlock. +- while read -r _ crypt_device _; do ++ while read -r _volname_ crypt_device _; do ++ # skip empty lines and lines which begin with the '#' char, per ++ # crypttab(5) ++ case $_volname_ in ++ ''|\#*) continue ;; ++ esac + if ! dev=$(clevis_map_device "${crypt_device}") \ + || [ -z "${dev}" ]; then + # Unable to get the device - maybe it's not available, e.g. a diff --git a/clevis.spec b/clevis.spec index 7504df8..c3a863e 100644 --- a/clevis.spec +++ b/clevis.spec @@ -1,6 +1,6 @@ Name: clevis Version: 18 -Release: 107%{?dist} +Release: 108%{?dist} Summary: Automated decryption framework License: GPLv3+ @@ -17,6 +17,7 @@ Patch0007: 0007-avoid-clevis-invalid-msg.patch Patch0008: 0008-Improve-boot-performance-by-removing-key-check.patch Patch0009: 0009-luks-enable-debugging-in-clevis-scripts-when-rd.debu.patch Patch0010: 0010-existing-luks2-token-id.patch +Patch0011: 0011-ignore-empty-and-comment-lines-in-crypttab.patch BuildRequires: git-core BuildRequires: gcc @@ -197,6 +198,10 @@ systemctl preset %{name}-luks-askpass.path >/dev/null 2>&1 || : %attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2 %changelog +* Thu Jan 12 2023 Sergio Arroutbi - 15-108 +- Ignore empty & comment lines in crypttab + Resolves: rhbz#2159728 + * Tue Dec 13 2022 Sergio Arroutbi - 18-107 - Add existing token id parameter Resolves: rhbz#2126533