-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Udiskie not able to unlock while udiskctl is #149
Comments
Hi, thanks for reporting. This is indeed strange. The cryptsetup line looks fine too Can you try the following script and see if it gives the same error? from gi.repository import Gio
proxy = Gio.DBusProxy.new_for_bus_sync(
Gio.BusType.SYSTEM,
Gio.DBusProxyFlags.NONE,
info=None,
name='org.freedesktop.UDisks2',
object_path='/org/freedesktop/UDisks2/block_devices/sdb1',
interface_name='org.freedesktop.UDisks2.Encrypted',
cancellable=None,
)
proxy.Unlock('(sa{sv})', 'YOURPASSWORD', {}) check both python2 and python3 if possible. |
This comment has been minimized.
This comment has been minimized.
The script works fine using any of python2 or python3 (no error message whatsoever and the disk is unlocked afterwards). |
ok, weird, udiskie does essentially just that. How did you acquire the cryptsetup output? Does it do the same if you manually enter the command as root? (I suppose not?) The output is what is shown if cryptsetup is executed
However, neither should apply here, because udisks is responsible for both and you verified that Can you go into
you may also print out the password to check if it contains any newlines etc (which shouldn't be the problem here according to the error message), but don't forget to delete this afterwards;) I don't have any other idea right now... except for maybe:
|
Please reopen if anyone can reproduce. Could be related to #153. |
Seeing this with udiskie 1.7.6 on Slackware 14.2. |
Hi, thanks for the info!
|
I noticed that keyfiles are "not supported" for daemon version 2.1.5, still, unlock_keyfile is preferred by the logic. The following works for me: def unlock_keyfile(self, password, auth_no_user_interaction=None):
if not self._daemon.keyfile_support:
return self.unlock(password, auth_no_user_interaction)
return self._M.Encrypted.Unlock(
'(sa{sv})',
'',
filter_opt({
'keyfile_contents': ('ay', password),
'auth.no_user_interaction': ('b', auth_no_user_interaction),
})
) |
On a side note, udiskie 2 sadly does not work for me. Installed via pip3, trying to run udiskie-mount against a block device gives me following error:
Not really sure what this points to. I checked and the typelibs are present on the machine. In case it's related: pygobject 3.18.2 is installed here (latest version requires newer glib2, which I'm reluctant to start replacing). Would you have any idea where to start looking for a fix? |
Hi,
Oh, so the problem is missing keyfile support in udisks itself? I can also release a version with a similar fix. I'm wondering why the
I've not seen this kind of error so far. Unfortunately I don't have a lot of time in the next few days, and I can't promise that I can help much further with this anyway, if it is specific to old versions, but I will take another look as soon as I can. Maybe we can extract a minimal reproducing example from the source code, and fix accordingly. |
Hi,
Yes, 2.7. After a quick look the reason seems to be that
Well, this is not critical, since 1.7 branch works without issues now. It's just unexpected, since afaics the requirements are met, and the stack trace isn't very helpful to me (never dealt with glib, gobject & Co). In case you have an idea where to look further, I'll be glad to hear it, but this is in no way urgent. |
When I try to mount my drive using
udiskie-mount
, it fails:At first, I thought this was an issue with polkit permissions. But setting these as described in the wiki didn't help.
Then, I discovered that I'm perfectly able to unlock the device using
udiskctl
withoutsudo
:After that, I'm also able to mount it using
udiskie-mount /dev/mapper/luks-b9ee78a4-1997-489e-8b3d-6f5919f36e9d
.Now, I'm really confused about what could be causing the problem.
If that helps, the output of
cryptsetup
isBtw, I'm running 64-bit NixOS.
The text was updated successfully, but these errors were encountered: