diff src/lib.rs @ 64:bbe84835d6db v0.0.5

More organization; add lots of docs. - moves `PamHandle` to its own module, since it will be used by both modules and clients. - adds a ton of documentation to the `PamModule` trait and reorders methods to most-interesting-first. - adds more flag values from pam_modules.h. - other misc cleanup.
author Paul Fisher <paul@pfish.zone>
date Thu, 22 May 2025 01:52:32 -0400
parents a7aa5ca0d00d
children
line wrap: on
line diff
--- a/src/lib.rs	Wed May 21 23:19:43 2025 -0400
+++ b/src/lib.rs	Thu May 22 01:52:32 2025 -0400
@@ -9,7 +9,7 @@
 //!  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 new password-based authenticator),
-//!     this will be the [`sm_authenticate`](PamModule::sm_authenticate) function.
+//!     this will be the [`PamModule::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
@@ -26,13 +26,15 @@
 #[cfg(feature = "experimental")]
 pub mod conv;
 pub mod items;
-pub mod module;
+mod module;
 
+mod handle;
 mod memory;
 mod pam_ffi;
 
 #[doc(inline)]
 pub use crate::{
     constants::{ErrorCode, Flags, Result},
-    module::{PamHandle, PamModule},
+    handle::PamHandle,
+    module::PamModule,
 };