view testharness/src/lib.rs @ 123:98a624cacd82

Get rid of all the warnings, and arrange attributes.
author Paul Fisher <paul@pfish.zone>
date Mon, 30 Jun 2025 04:26:44 -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);