view testharness/src/lib.rs @ 109:bb465393621f

Minor cleanup and reorg. - Use those nice new macros we just implemented. - Straighten out the macro file. - Move the `BinaryPayload` into `structs.rs`, leaving helpers behind.
author Paul Fisher <paul@pfish.zone>
date Sat, 28 Jun 2025 02:49:35 -0400
parents a2676475e86b
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);