Crate libpam_sys_impls

Source
Expand description

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.

Enums§

PamImpl
The PAM implementations supported by libpam-sys.

Functions§

build_target_impl
For build.rs use: Detects the PAM implementation that should be used for the target of the currently-running build script.
currently_installed
The version of LibPAM installed on this machine (as found by dlopen).
enable_pam_impl_cfg
Generates cargo directives for build scripts to enable cfg(pam_impl).
os_default
Gets the PAM version based on the target OS.
pam_impl_cfg_string
enable_pam_impl_cfg, but returned as a string.