Commit Graph

6 Commits

Author SHA1 Message Date
Asger Geel Weirsøe
5817074f1a release: v0.9.0 pre-release — X11 PAM integration, shadow suppression, macOS cfg guards
Some checks failed
Test / test (push) Failing after 4m25s
Release / release (push) Failing after 6m37s
- PAM module now correctly fires on failed attempts (must precede auth includes)
- ahfail-display: sprite-sized window replaces full-screen overlay
- ahfail-display: XGrabKeyboard unlock detection replaces process scanning
- ahfail-display: _COMPTON_SHADOW=0 suppresses picom shadow without config changes
- ahfail-display: flock single-instance guard prevents stacking on rapid failures
- X11-specific code guarded behind #[cfg(target_os = "linux")] for macOS builds
- Removed debug logging (dlog/plog) from display and PAM binaries
- README: PAM ordering requirement, supported locker table, roadmap section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 22:01:02 +02:00
Asger Geel Weirsøe
b8a03d72bb fix: use build-time AHFAIL_INSTALL_DIR on macOS, not hardcoded /usr/local/lib
Some checks failed
Test / test (push) Has been cancelled
Apple Silicon Homebrew uses /opt/homebrew as prefix, so hardcoding
/usr/local/lib/ahfail/ahfail-display as DEFAULT_PATH breaks there.
build.rs now falls back to /usr/local/lib on macOS and /usr/lib on Linux
when AHFAIL_LIBDIR is not set; macOS uses the same concat!(env!(...))
approach as Linux.

install-macos.sh passes -Dlibdir so the baked-in path matches INSTALL_DIR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 15:24:34 +02:00
Asger Geel Weirsøe
702f449d0e fix: PID-based volume lock with state persistence and multiarch default path
Some checks failed
Test / test (push) Failing after 1m23s
Volume lock file now stores {pid}:{volume}:{muted} instead of "1":
- Allows recovery of saved volume state if the holder is SIGKILLed
- On stale lock detection (holder PID not alive), inherit saved volume state
  and take ownership — prevents permanent volume loss and infinite lockout

PAM module DEFAULT_PATH now baked in at build time via AHFAIL_LIBDIR env var
passed by Meson, fixing the wrong path on multiarch Debian/Ubuntu where libdir
is /usr/lib/x86_64-linux-gnu rather than /usr/lib.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 12:41:06 +02:00
Asger Geel Weirsøe
4b9d69ffbc fix: pam_set_data error handling, setsid+fd sweep in grandchild, is_replace logic, null pamh guard 2026-05-06 12:05:43 +02:00
Asger Geel Weirsøe
c24bd26ba1 feat: add ahfail-pam PAM module with cleanup-based failure detection
Implements a C-ABI PAM shared library that registers a pam_set_data
cleanup callback to detect auth failures and spawn/kill ahfail-display
via a double-fork, without ever touching credentials.
2026-05-06 12:00:24 +02:00
Asger Geel Weirsøe
8dd06377fc refactor: convert to Cargo workspace, move gtklock crate
Replaces the single-crate Cargo.toml with a workspace containing
ahfail-gtklock (migrated from root src/) and three stub crates
(ahfail-ui, ahfail-pam, ahfail-display). Updates meson.build to
build with -p ahfail-gtklock.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 16:23:31 +02:00