view testharness/src/lib.rs @ 149:14708d9061dc

Add safety section to BinaryPayload::total_bytes.
author Paul Fisher <paul@pfish.zone>
date Mon, 07 Jul 2025 12:30:25 -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);