comparison src/libpam/handle.rs @ 131:a632a8874131

Get all the Linux-PAM functions into libpam-sys, and get tests right.
author Paul Fisher <paul@pfish.zone>
date Wed, 02 Jul 2025 02:24:21 -0400
parents 80c07e5ab22f
children 6c1e1bdb4164
comparison
equal deleted inserted replaced
130:80c07e5ab22f 131:a632a8874131
12 }; 12 };
13 use num_enum::{IntoPrimitive, TryFromPrimitive}; 13 use num_enum::{IntoPrimitive, TryFromPrimitive};
14 use std::cell::Cell; 14 use std::cell::Cell;
15 use std::ffi::{c_char, c_int, CString}; 15 use std::ffi::{c_char, c_int, CString};
16 16
17 use libpam_sys::cfg_pam_impl;
17 use std::ptr; 18 use std::ptr;
18 use std::ptr::NonNull; 19 use std::ptr::NonNull;
19 use libpam_sys::cfg_pam_impl;
20 20
21 /// Owner for a PAM handle. 21 /// Owner for a PAM handle.
22 pub struct LibPamHandle(pub NonNull<libpam_sys::pam_handle>); 22 pub struct LibPamHandle(pub NonNull<libpam_sys::pam_handle>);
23 23
24 impl AsRef<libpam_sys::pam_handle> for LibPamHandle { 24 impl AsRef<libpam_sys::pam_handle> for LibPamHandle {