Mercurial > crates > nonstick
diff src/lib.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 | a7aa5ca0d00d |
line wrap: on
line diff
--- a/src/lib.rs Wed May 21 19:01:17 2025 -0400 +++ b/src/lib.rs Wed May 21 23:10:09 2025 -0400 @@ -1,21 +1,21 @@ //! A safe, nonstick interface to PAM. //! //! This implements a type-safe library to interact with PAM. -//! Currently, it implements the subset of PAM useful for implementing a module. +//! Currently, it implements a subset of PAM useful for implementing a module. //! //! To write a new PAM module using this crate: //! //! 1. Create a `dylib` crate. -//! 2. Implement a subset of the functions in the [PamModule] trait +//! 2. Implement a subset of the functions in the [`PamModule`] trait //! corresponding to what you want your module to do. -//! In the simplest case (for a password-authentication system), -//! this will be the [PamModule::sm_authenticate] function. -//! 3. Export your PAM module using the [pam_hooks!] macro. +//! In the simplest case (for a new password-based authenticator), +//! this will be the [`sm_authenticate`](PamModule::sm_authenticate) function. +//! 3. Export your PAM module using the [`pam_hooks!`] macro. //! 4. Build and install the dynamic library. //! This usually entails placing it at -//! `/usr/lib/security/pam_your_module.so`, +//! <code>/usr/lib/security/pam_<var>your_module</var>.so</code>, //! or maybe -//! <code>/usr/lib/<var>your-architecture</var>/security/pam_your_module.so</code>. +//! <code>/usr/lib/<var>your-architecture</var>/security/pam_<var>your_module</var>.so</code>. //! //! For general information on writing PAM modules, see //! [The Linux-PAM Module Writers' Guide][module-guide] @@ -23,6 +23,7 @@ //! [module-guide]: https://www.chiark.greenend.org.uk/doc/libpam-doc/html/Linux-PAM_MWG.html pub mod constants; +#[cfg(feature = "experimental")] pub mod conv; pub mod items; pub mod module; @@ -33,6 +34,5 @@ #[doc(inline)] pub use crate::{ constants::{ErrorCode, Flags, MessageStyle, Result}, - conv::Conversation, module::{PamHandle, PamModule}, };