Unverified Commit 40932c9a authored by Christian Kögler's avatar Christian Kögler Committed by GitHub
Browse files

nixos/luksroot: Check if the device was opened while reading password (#369627)

parents 26405f7a a5cc2d09
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -185,6 +185,10 @@ let
                    echo "reused"
                    passphrase=$(cat /crypt-ramfs/passphrase)
                    break
                elif [ -e /dev/mapper/${dev.name} ]; then
                    echo "opened externally"
                    rm -f /crypt-ramfs/device
                    return
                else
                    # ask cryptsetup-askpass
                    echo -n "${dev.device}" > /crypt-ramfs/device