view testharness/src/lib.rs @ 124:f469b8d9ad78 default tip

Add tests for the original X/SSO constants list.
author Paul Fisher <paul@pfish.zone>
date Mon, 30 Jun 2025 04:54:38 -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);