puiterwijk/canarywatcher

Wait for cryptsetup luksClose completion

Closed this issue · 0 comments

The current code simply spawns cryptsetup and then immediately continues to trigger the "b" sysrq. This means that cryptsetup will likely not even have come far enough to do correct syscalls to clear the key from memory.

It should be simple to add a waitpid with a timeout of e.g. 0.5 seconds to ensure that luksClose completes but still force a shutdown if it hangs for some reason.