Skip to content

fix: check stderr output deactivating luks volume#500

Open
gabelluardo wants to merge 1 commit intocanonical:masterfrom
gabelluardo:fix-deactivate-luks
Open

fix: check stderr output deactivating luks volume#500
gabelluardo wants to merge 1 commit intocanonical:masterfrom
gabelluardo:fix-deactivate-luks

Conversation

@gabelluardo
Copy link
Member

systemd-cryptsetup behaves unexpectedly when trying to unmount a volume that doesn't exist or is already inactive. Even though it fails and prints Device is not active to stderr, it still returns an exit code 0, consequentially the Deactivate function doesn't return an error and the operation is reported as successful by tpmctl.

I’ve updated the check to ensure that if there is any output in stderr, it's treated as an error even if the exit code is 0.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant