mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-31 08:25:37 +00:00
37bb4906ce
Since /etc/luks-functions are currently exporting passphrases tested good per cryptsetup to be reused in the code, the logic calling both luks_reencrypt and luks_change_passphrase testing for non-empty luks_current_Disk_Recovery_Key_passphrase was bogus. This commit includes a new variable luks_new_Disk_Recovery_Key_desired which is set when reencryption is desired. The 3 use cases (reencrypt+passphrase change, reencrypt no passphrase change and passphrase change alone now only test for luks_new_Disk_Recovery_Key_desired and luks_new_Disk_Recovery_Key_passphrase_desired, nothing else.