comparison src/lib.rs @ 173:46e8ce5cd5d1

Miscellaneous doc and code cleanups.
author Paul Fisher <paul@pfish.zone>
date Tue, 29 Jul 2025 16:52:32 -0400
parents e27c5c667a5a
children 9e4ce1631bd3
comparison
equal deleted inserted replaced
172:6727cbe56f4a 173:46e8ce5cd5d1
8 //! 1. Create a `dylib` crate. 8 //! 1. Create a `dylib` crate.
9 //! 2. Implement a subset of the functions in the [`PamModule`] trait 9 //! 2. Implement a subset of the functions in the [`PamModule`] trait
10 //! corresponding to what you want your module to do. 10 //! corresponding to what you want your module to do.
11 //! In the simplest case (for a new password-based authenticator), 11 //! In the simplest case (for a new password-based authenticator),
12 //! this will be the [`PamModule::authenticate`] function. 12 //! this will be the [`PamModule::authenticate`] function.
13 //! 3. Export your PAM module using the [`pam_hooks!`] macro. 13 //! 3. Export your PAM module using the [`pam_export!`] macro.
14 //! 4. Build and install the dynamic library. 14 //! 4. Build and install the dynamic library.
15 //! This usually entails placing it at 15 //! This usually entails placing it at
16 //! <code>/usr/lib/security/pam_<var>your_module</var>.so</code>, 16 //! <code>/usr/lib/security/pam_<var>your_module</var>.so</code>,
17 //! or maybe 17 //! or maybe
18 //! <code>/usr/lib/<var>your-architecture</var>/security/pam_<var>your_module</var>.so</code>. 18 //! <code>/usr/lib/<var>your-architecture</var>/security/pam_<var>your_module</var>.so</code>.
59 #[cfg(feature = "link")] 59 #[cfg(feature = "link")]
60 pub mod libpam; 60 pub mod libpam;
61 pub mod logging; 61 pub mod logging;
62 62
63 #[cfg(feature = "link")] 63 #[cfg(feature = "link")]
64 #[doc(hidden)]
65 pub use crate::libpam::ModuleExporter;
66 #[cfg(feature = "link")]
67 #[doc(inline)] 64 #[doc(inline)]
68 pub use crate::libpam::{LibPamHandle, LibPamTransaction, TransactionBuilder}; 65 pub use crate::libpam::{LibPamHandle, LibPamTransaction, TransactionBuilder};
69 #[doc(inline)] 66 #[doc(inline)]
70 pub use crate::{ 67 pub use crate::{
71 constants::{ 68 constants::{