2 unstable releases
| 0.2.0 | Aug 3, 2025 |
|---|---|
| 0.1.0 | Jul 31, 2025 |
#167 in FFI
181 downloads per month
Used in 6 crates
(3 directly)
11KB
141 lines
An enumeration of PAM implementations and tools to detect them.
Configuration
When used at compile time, this crate uses the target OS by default,
but can be overridden with the LIBPAMSYS_IMPL environment variable.
See the documentation of build_target_impl for details.
Detecting PAM
Build time
Use enable_pam_impl_cfg in your build.rs to generate custom #[cfg]s
for conditional compilation based on PAM implementation.
To detect the implementation that will be used at runtime, use the
build_target_impl function.
Run time
The implementation of PAM installed on the machine where the code is running
can be detected with currently_installed, or you can use
os_default to see what implementation is used on a given target.
libpam-sys-impls: LibPAM library detection
This crate detects what implementation of LibPAM should be used, as part of the build script, and exports that information to downstream crates. It can also be used at runtime, but is primarily intended for build scripts.
Its main use is as a backend for libpam-sys. That crate re-exports pretty much everything we provide. In most cases, you can just use that instead of depending upon this directly.
MSRV
This library supports Rust 1.75, as the version currently (July 2025) available in Debian Trixie and Ubuntu 24.04 LTS.
Dependencies
~43KB