aluzzardi / pam_usb

Hardware authentication for Linux using ordinary USB Flash Drives.
GNU General Public License v2.0
152 stars 82 forks source link

Move to udisks2, udisks 1 is deprecated #18

Open alessio opened 10 years ago

alessio commented 10 years ago

Hi there,

pam_usb currently uses udisks 1. That has been deprecated for a while now, in favor of udisks 2. Please port pam_usb to udisks 2 and drop code that uses the old hal/devicekit-disks/udisks 1 bits.

Please note that udisks2 also has a library interface (libudisks2-0) which is easier to use than raw D-BUS calls. It is also introspectable (gir1.2-udisks-2.0) so you can use it from languages like Python.

The API is documented at http://udisks.freedesktop.org/docs/latest/ .

alessio commented 9 years ago

Hi,

Any news? This issue has caused the package to be removed from Debian.

nazar-pc commented 8 years ago

@aluzzardi, can you take a look at this? I have pam_usb installed from previous versions of Ubuntu along with dependencies that are not present in repositories anymore, but I'm not sure how long will this remain working. Or, maybe, there is any alternative so you don't want to maintain this tool anymore?

aluzzardi commented 8 years ago

Can anyone take a spin at this? I'd be happy to review and merge, but unfortunately don't have the time to do the migration myself.

nazar-pc commented 8 years ago

Looks like @luka-n started udisks2 port in his fork: https://github.com/luka-n/pam_usb Luka, would you mind to make PR?

luka-n commented 8 years ago

Hi, maybe not just yet. At this point it "works for me". Wouldn't mind someone taking a look though. This glib/gobject/dbus/gdbus/udisks stack is totally new to me. I'm not at all sure about the way I'm using g_main_context_iteration() to sidestep the need for a main loop in the probing function, say.

nazar-pc commented 8 years ago

@aluzzardi, will you have free time soon to review mentioned fork? There was no changes in it since last comments here, so, apparently, it works good enough to take a look at it.

frederikmoellers commented 8 years ago

I successfully tested the fork on Debian stretch. It works exactly like the original. There's an issue with xscreensaver, but it's unrelated to pam_usb. It seems to be a problem with xscreensaver itself (xscreensaver-command -deactivate fails to deactivate xscreensaver).

nazar-pc commented 8 years ago

Compiled on Ubuntu 16.10 (a bit ahead of 16.04 already) - works as expected for me as well. I think it just needs to be merged and packaged properly.

nazar-pc commented 8 years ago

Here are repacked packages for Ubuntu 15.10..16.10 (as of today). I've took 0.5.0-4 version of packages from Ubuntu 14.10, replaced 4 modified files and changed udisks dependency to udisks2, so now it is installable on never distros (I recommend to compile it yourself though).

build.zip

aluzzardi commented 8 years ago

@nazar-pc Can you open a pull request? Thanks!

The fork looks good - we can merge it.

nazar-pc commented 8 years ago

It is not my fork, it is rather for @luka-n to do PR or you can merge it directly. Packaging code is not in this repository either, so...

nazar-pc commented 8 years ago

Updated build in message above, gir1.2-udisks-2.0 package is actually required in runtime, but was not added to dependencies.

aluzzardi commented 8 years ago

@luka-n care to open a PR?

Jusix commented 8 years ago

@aluzzardi No reaction since april? What happened?

Update: In the meantime xenial 16.04 users, feel free to use my PPA https://launchpad.net/~njj/+archive/ubuntu/pamusb

aluzzardi commented 8 years ago

@Jusix Sorry, I'm not actively maintaining this project. Will review the PR.

nazar-pc commented 8 years ago

I'm actively using version from PR since the end of April. The only issue I experience is that session unlocking doesn't work. Flash drive is not mounted when inserted and thus can't unlock desktop. What is even worse, LightDM's password field disappears, so I can't type it, but Enter doesn't work either. So I need to first unlock session with password, insert flash drive and then everything else (including locking) works fine.

Grief commented 8 years ago

@Jusix I am just started to configure pam_usb using your ppa and I've found a minor issue: there is a missing dependency gir1.2-udisks-2.0. Without that package installed, this happens:

sudo pamusb-conf --add-device my-usb-stick
Traceback (most recent call last):
  File "/usr/bin/pamusb-conf", line 22, in <module>
    gi.require_version('UDisks', '2.0')
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 118, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace UDisks not available

I am going to continue now...

nazar-pc commented 8 years ago

I've already mentioned that earlier. Other than that it should work fine (it works for me for half a year already, I'm on Ubuntu 16.10 right now).