view libpam-sys/src/lib.rs @ 176:0730f5f2ee2a

Turn `libpam-sys-consts` back into `libpam-sys-impls`. This moves the constants into `libpam-sys` and makes `libpam-sys-impls` responsible solely for detecting the current PAM implementation.
author Paul Fisher <paul@pfish.zone>
date Wed, 30 Jul 2025 17:53:31 -0400
parents 9e4ce1631bd3
children
line wrap: on
line source

//! `libpam-sys` provides low-level access to LibPAM.
//!
//! Everything in here is directly as exported from the LibPAM library or
//! its header files, with two exceptions:
//!
//! - The [`pam_impl`] submodule (and the associated [`pam_impl_name!`] macro),
//!   which can be used to detect the current PAM implementation.
//! - The [`aliases`] submodule, which contains convenient aliases
//!   for callback types used in libpam, so you don't have to type
//!   `unsafe extern "C" fn(this is so long)` all the time.
#![doc = concat!("This documentation was built for the **", pam_impl_name!(), "** implementation.")]
//!
//! You can override this **at build time** by setting the `LIBPAMSYS_IMPL`
//! environment variable to one of the values of the [`pam_impl::PamImpl`] enum.
//! For more information about configuration, see the documentation of
//! [`libpam-sys-impls`](https://crates.io/crates/libpam-sys-impls).
#![allow(non_camel_case_types)]
#![allow(unused_imports)]

pub mod aliases;
mod constants;
mod ffi;
#[doc(inline)]
pub use crate::{constants::*, ffi::*};
#[doc(inline)]
pub use libpam_sys_impls as pam_impl;
#[doc(inline)]
pub use libpam_sys_impls::pam_impl_name;