Skip to content

automountManager: Fix password not re-asked for TCRYPT devices

segfault3 requested to merge segfault3/gnome-shell:7631-fix-unlock-dialog into main

Since commit released in cryptsetup 2.5.0, returns EPERM instead of EINVAL when the TCRYPT header can't be decrypted with the provided password and parameters.

Closes: #7631 (closed)

Steps to test this:

  1. Create a VeraCrypt volume in a file
    dd if=/dev/zero of="$DISK" bs=1M count=10
    DEV=$(sudo losetup --find --show "$DISK")
    sudo zuluCrypt-cli -c -t vcrypt -p test -d "$DEV"
    sudo losetup --detach "$DEV"
  2. Ensure that udisks2 supports unlocking TCRYPT devices:
    sudo touch /etc/udisks2/tcrypt.conf && sudo systemctl restart udisks2
  3. Ensure that auto-mounting is enabled:
    dconf write /org/gnome/desktop/media-handling/automount true
  4. Attach the VeraCrypt file container:
    udisksctl loop-setup --file "$DISK"
  5. GNOME Shell opens the unlock dialog. Enter an incorrect password and try to unlock.
Edited by segfault3

Merge request reports