cryptsetup: handle parallel activation of volumes with another tool gracefully
authorKamil Szczęk <kamil@szczek.dev>
Thu, 27 Jun 2024 17:05:43 +0000 (19:05 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 21 Jul 2024 18:02:59 +0000 (19:02 +0100)
commit88cf0906aa395c9bf7d6c28b8fc84e6e203eb0dc
tree760751b8305720f466cf18ee57a775b7feebc660
parenteab98338f8370521f274ec3de1a1408e2c62e685
cryptsetup: handle parallel activation of volumes with another tool gracefully

This commit makes systemd-cryptsetup exit with a successful status when
the volume gets unlocked outside of the current systemd-cryptsetup
process while it was executing. This can be easily reproduced by calling
systemd-cryptsetup, and while it waits for user to input a password/PIN,
unlock the volume in a second terminal. Then after entering the password
systemd-cryptsetup will exit with a non-zero status code.
src/cryptsetup/cryptsetup.c