mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
automountManager: Fix password not re-asked for TCRYPT devices
Since commitf881092bbcreleased in cryptsetup 2.5.0, cryptsetup returns EPERM instead of EINVAL when the TCRYPT header can't be decrypted with the provided password and parameters. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7631 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3300> (cherry picked from commit9e6552a20d)
This commit is contained in:
parent
6ba5a847aa
commit
89e15061a0
1 changed files with 5 additions and 2 deletions
|
|
@ -199,8 +199,11 @@ class AutomountManager {
|
|||
e.message.includes('No key available to unlock device') || // udisks (no password)
|
||||
// libblockdev wrong password opening LUKS device
|
||||
e.message.includes('Failed to activate device: Incorrect passphrase') ||
|
||||
// cryptsetup returns EINVAL in many cases, including wrong TCRYPT password/parameters
|
||||
e.message.includes('Failed to load device\'s parameters: Invalid argument')) {
|
||||
// cryptsetup returns EINVAL (< v2.5.0) or EPERM (>= v2.5.0)
|
||||
// when the TCRYPT header can't be decrypted with the provided
|
||||
// password/parameters.
|
||||
e.message.includes('Failed to load device\'s parameters: Invalid argument') ||
|
||||
e.message.includes('Failed to load device\'s parameters: Operation not permitted')) {
|
||||
this._reaskPassword(volume);
|
||||
} else {
|
||||
if (e.message.includes('Compiled against a version of libcryptsetup that does not support the VeraCrypt PIM setting')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue