Skip to content

Simple daemon for locking and unlocking macOS with Yubikey

License

Notifications You must be signed in to change notification settings

jbharter/yubikeylockd

 
 

Repository files navigation

yubikeylockd

Simple daemon for locking and unlocking macOS with Yubikey.

Build

make clean
make install

Additional requirements

How it works

When you attach Yubikey for the first time launchctl will run yubikeylockd daemon that will simply monitor the state of the Yubikey USB devices. Daemon based on the sample provided by Apple for IOKit development.

It does two things:

  • when device is attached it makes activity via IOPMAssertionDeclareUserActivity call to turn screen on
  • after device is detached it uses SACLockScreenImmediate from the Login framework to immediately lock macOS

About

Simple daemon for locking and unlocking macOS with Yubikey

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 95.1%
  • Makefile 4.9%