pallotron / yubiswitch

OSX status bar application to enable/disable Yubikey Nano
Other
872 stars 65 forks source link

MBP on High Sierra not locking when Yubikey Nano removed #78

Closed rca closed 6 years ago

rca commented 6 years ago

Hello, thanks for making this tool!

I'm on Mac OS High Sierra v10.13.4 and have a YubiKey 4 Nano. The feature to lock the computer when the yubikey is removed is not working.

I'm using Yubiswitch 0.12:

image

In the Mac Console I see the following message when I remove the YubiKey:

AppleEvents: received mach msg which wasn't complex type as expected in getMemoryReference.

Using ioreg I see the following:

$ ioreg -p IOUSB -l -w 0 -x | grep Yubikey -A10 | grep -e Product -e Vendor
          "idProduct" = 0x407
          "iProduct" = 0x2
          "USB Product Name" = "Yubikey 4 OTP+U2F+CCID"
          "USB Vendor Name" = "Yubico"
          "idVendor" = 0x1050

And I've changed the product id in the settings accordingly:

screen shot 2018-05-14 at 8 59 00 am

Any additional info I can provide to help get this fixed?

Thank you!

femiagbabiaka commented 6 years ago

@rca bit old, but you added an extra character onto your product ID. When I use 0x407, the software works again.

rca commented 6 years ago

@femiagbabiaka unfortunately, using 0x407 does not lock the computer when I remove the Yubikey :/

femiagbabiaka commented 6 years ago

@rca ack, can confirm that doesn't work for me either ATM

femiagbabiaka commented 6 years ago

https://github.com/pallotron/yubiswitch/blob/master/yubiswitch.helper/main.c#L55-L59

@rca looks like the code that would do that is commented out -- likely because it doesn't work, seems like the maintainer wanted some obj-c interop. I'm not a maintainer, but I'll try to put up a PR in the next few days to fix it. (also to add an uninstall script...)

rca commented 6 years ago

Did that feature ever work? According to the comment, that wouldnonpy work in objective c ad that’s a pure C file.

That said, if you can get it working that would be awesome!

Thank you!

rca commented 6 years ago

I'm going to close this. A completely fresh OS install, plus a reboot seems to work fine! 👍