Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error out when LUKS version 2 is used (issue #2204) #2381

Merged
merged 2 commits into from Apr 27, 2020
Merged

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented Apr 27, 2020

  • Type: Minor Bug Fix
    It is a minor bug when "rear mkrescue/mkbackup" does not error out
    when things have actually failed.
    In this case when gathering crypt information was not successful
    the code blindly proceeds resulting wrong (incomplete) entries
    in disklayout.conf that let later (when it is too late) "rear recover" fail.

  • Impact: High

  • Reference to related issue (URL):
    Failed to recover LUKS version 2 #2204

  • How was this pull request tested?
    By me on my current homeoffice laptop that uses LUKS 1.
    I get still same 'crypt' entries in disklayout conf.

  • Brief description of the changes in this pull request:
    Error out during "rear mkrescue/mkbackup" when LUKS version 2 is used
    because currently LUKS version 2 is not suppported.
    When LUKS version 2 is used it fails at least to determine the hash value cf.
    Failed to recover LUKS version 2 #2204 (comment)
    so we use an empty hash value as a simple test if gathering crypt information
    was successful and error out if not.

Error out during "rear mkrescue/mkbackup" when LUKS version 2 is used.
LUKS version 2 is not suppported, see #2204
When LUKS version 2 is used it fails at least to determine the hash value
so we use an empty hash value as a simple test if gathering crypt information
was successful and error out if not.
@jsmeix jsmeix added the minor bug An alternative or workaround exists label Apr 27, 2020
@jsmeix jsmeix added this to the ReaR v2.6 milestone Apr 27, 2020
@jsmeix jsmeix requested a review from a team April 27, 2020 08:31
@jsmeix jsmeix self-assigned this Apr 27, 2020
@jsmeix
Copy link
Member Author

jsmeix commented Apr 27, 2020

If there are no objections I would like to merge it today afternoon.

More fail-safe error message text now using
"... LUKS device '$target_name' at '$source_device' ..."
that looks OK even if $target_name or $source_device are empty
so the user can see that things are missing in "... LUKS device '' at '' ..."
instead of what it was before
"... LUKS device /dev/mapper/$target_name at $source_device ..."
which would have shown confusing/misspelled/wrong output
to the user when $target_name or $source_device are empty
like "... LUKS device /dev/mapper/  at  (only ..."
(`/dev/mapper` is no device but a directory and what is 'at'?)
@jsmeix jsmeix merged commit 7415af8 into master Apr 27, 2020
@jsmeix jsmeix deleted the jsmeix-patch-1 branch April 27, 2020 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed / solved / done minor bug An alternative or workaround exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant