Mercurial > crates > nonstick
view testharness/src/lib.rs @ 127:c77846f3a979
GET CTEST WORKING.
This will verify that the functions we're exporting are correct.
It has been a nightmare.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Mon, 30 Jun 2025 22:56:26 -0400 |
parents | 98a624cacd82 |
children |
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);