Mercurial > crates > nonstick
view src/pam_ffi.rs @ 62:d83623951070
Further improve docs and put `conv` behind a feature gate.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Wed, 21 May 2025 23:10:09 -0400 |
parents | 05cc2c27334f |
children | bbe84835d6db |
line wrap: on
line source
//! Functions exported by the PAM FFI. use libc::c_char; use std::ffi::c_int; #[link(name = "pam")] extern "C" { pub fn pam_get_data( pamh: *const libc::c_void, module_data_name: *const c_char, data: &mut *const libc::c_void, ) -> c_int; pub fn pam_set_data( pamh: *mut libc::c_void, module_data_name: *const c_char, data: *const libc::c_void, cleanup: extern "C" fn( pamh: *const libc::c_void, data: *mut libc::c_void, error_status: c_int, ), ) -> c_int; pub fn pam_get_item( pamh: *const libc::c_void, item_type: c_int, item: &mut *const libc::c_void, ) -> c_int; pub fn pam_set_item( pamh: *mut libc::c_void, item_type: c_int, item: *const libc::c_void, ) -> c_int; pub fn pam_get_user( pamh: *const libc::c_void, user: &mut *const c_char, prompt: *const c_char, ) -> c_int; pub fn pam_get_authtok( pamh: *const libc::c_void, item_type: c_int, data: &mut *const c_char, prompt: *const c_char, ) -> c_int; }