Mercurial > crates > nonstick
view testharness/src/lib.rs @ 144:56b559b7ecea
Big rename: separate concepts of Transaction from Handle.
- An application that uses PAM creates a Transaction.
- The Transaction has a Handle.
Currently, a module still get something called a "handle",
but that's probably going to change soon.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 06 Jul 2025 11:59:26 -0400 |
parents | c77846f3a979 |
children | 1bc52025156b |
line wrap: on
line source
//! The nonstick library extern crate nonstick; use nonstick::{pam_hooks, Flags, PamHandleModule, PamModule}; use std::ffi::CStr; struct TestHarness; impl<M: PamHandleModule> 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);