shtirlic / yubikeylockd

Simple daemon for locking and unlocking macOS with Yubikey

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yubikeylockd

Simple daemon for locking and unlocking macOS with Yubikey.

Install

Via Homebrew formula:

brew tap shtirlic/yubikeylockd https://github.com/shtirlic/yubikeylockd
brew install shtirlic/yubikeylockd/yubikeylockd

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

About

Simple daemon for locking and unlocking macOS with Yubikey

License:MIT License


Languages

Language:C 81.3%Language:Ruby 16.6%Language:Makefile 2.1%