Simple daemon for locking and unlocking macOS with Yubikey
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
License.txt
Makefile
README.md
com.podtynnyi.yubikeylockd.plist
yubikeylockd.c
yubikeylockd.rb

README.md

yubikeylockd

Simple daemon for locking and unlocking macOS with Yubikey.

Install

Via Homebrew formula:

brew install https://raw.githubusercontent.com/shtirlic/yubikeylockd/master/yubikeylockd.rb

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 IORequestIdle to put display to sleep and (if you configured it) also locks the OS X