clevis icon indicating copy to clipboard operation
clevis copied to clipboard

return 0/return 1 switched in scripts/local-top/clevis.in

Open brydling opened this issue 3 years ago • 2 comments

Hi,

Running Ubuntu 20.04 on a luks2-encrypted ZFS mirror root pool and made some debugging of scripts/local-top/clevis.in to discover the bug that prevented unlocking of multiple devices in initramfs (that I later noticed you have already fixed in version 17). However I found another bug during the investigation. In the functions luks1_decrypt and luks2_decrypt, "return 0" and "return 1" have been mixed up. When a device is unlocked, it will now return 0 which will make the calling if-statement jump to the "else" block. I have discovered this by testing with debug prints.

The consequence of this bug seem minor, inducing a "sleep 5" between each unlock that probably isn't necessary. I tested correcting the bug and it worked for me.

Regards, Niclas

brydling avatar Oct 24 '21 20:10 brydling

Hello @brydling. Thanks for commenting the issue.

Can you please upload a PR with the correcting bug associated to this issue?

sarroutbi avatar Nov 16 '21 12:11 sarroutbi

Hello @sarroutbi there is already a pull request for that at https://github.com/latchset/clevis/pull/326

ngtech avatar Nov 19 '21 11:11 ngtech