Mercurial > crates > nonstick
view testharness/src/lib.rs @ 155:ab8020566cd9
Only use real PAM constants for logging within `nonstick/libpam`.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 08 Jul 2025 00:49:38 -0400 |
parents | 1bc52025156b |
children |
line wrap: on
line source
//! The nonstick library extern crate nonstick; use nonstick::{pam_hooks, Flags, ModuleClient, PamModule}; use std::ffi::CStr; struct TestHarness; impl<M: ModuleClient> PamModule<M> for TestHarness { fn authenticate(_handle: &mut M, _args: Vec<&CStr>, _flags: Flags) -> nonstick::Result<()> { Ok(()) } fn account_management( _handle: &mut M, _args: Vec<&CStr>, _flags: Flags, ) -> nonstick::Result<()> { Ok(()) } } pam_hooks!(TestHarness);