FS#18103 - [pmount] doesn't prompt for passphrase after recent cryptsetup update
Attached to Project:
Arch Linux
Opened by Jens Adam (byte) - Monday, 01 February 2010, 06:11 GMT
Last edited by Andrea Scarpino (BaSh) - Thursday, 10 June 2010, 13:18 GMT
Opened by Jens Adam (byte) - Monday, 01 February 2010, 06:11 GMT
Last edited by Andrea Scarpino (BaSh) - Thursday, 10 June 2010, 13:18 GMT
|
Details
pmount is installed setuid root, I'm in the storage group,
yet I can no longer mount my LUKS devices:
"Internal error: cryptsetup luksOpen failed" Running pmount with sudo works, though. A simple rebuild of pmount didn't fix it. |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Thursday, 10 June 2010, 13:18 GMT
Reason for closing: Fixed
Additional comments about closing: on trunk
Thursday, 10 June 2010, 13:18 GMT
Reason for closing: Fixed
Additional comments about closing: on trunk
Interestingly, this does NOT affect mounting my whole-disk encryption. Only my external drives.
That most recent upgrade included a lot of programs, but after sorting through it, I believe it included cryptsetup (1.0.7-1 > 1.1.0-1), device-mapper (2.02.53-1 > 2.02.60-2), and lvm2 (2.02.53-1 > 2.02.60-2). I suspect one of those might be the culprit, but I'm not knowledgeable enough to do more than hold that hunch (though I'm going to try process of elimination on another computer when I have a chance and report back). A Google search for "pmount cryptsetup luksopen failed" likewise resulted in what appears to be a multiply-mirrored Debian bug report from 2009 that I'm not smart enough to understand.
I reinstalled the old versions of cryptsetup, device-mapper and devicekit-disks and the problem was resolved.
For now, they will be on the list of ignored packages (IgnorePkg = cryptsetup device-mapper devicekit-disks)
Using the latest version of devicekit-disks (009-4) has no effect on my systems. I don't think it was included in the batch of upgrades after which I saw this issue, so it didn't occur to me that it might be a problem.
Anyway, I can confirm that the issue is NOT in the latest version of device-mapper or lvm2. I held back both of those on my other box and upgraded ONLY cryptsetup (as noted, 1.0.7-1 to 1.1.0-1), and after a reboot, this issue appeared. So something changed in cryptsetup to cause this. So, mitre, holding back device-mapper and devicekit-disks is probably pointless.
I don't know anything about the race conditions brain0 discusses. Nor do I have any idea about whether this is a problem in cryptsetup or a problem in pmount. But it's the cryptsetup upgrade that does this on my system.
I don't have time to do this now, but you could try this (if you know how to): See if pmount has a "verbose" option that prints the cryptsetup command it executes. If not, go into the source and patch pmount such that it always prints the cryptsetup command to stderr before executing it. That will bring us a step closer to the problem.
@frankspace: I thought the device-mapper influence the cryptsetup. In fact, I should have tested it.
spawnv(): executing /usr/sbin/cryptsetup '/usr/sbin/cryptsetup' 'isLuks' '/dev/loop0'
spawn(): /usr/sbin/cryptsetup terminated with status 0
spawnv(): executing /usr/sbin/cryptsetup '/usr/sbin/cryptsetup' 'luksOpen' '/dev/loop0' '_dev_loop0'
spawn(): /usr/sbin/cryptsetup terminated with status 234
Internal error: cryptsetup luksOpen failed
It works as root, like reported earlier.
But now there's http://bugs.archlinux.org/task/19463