Mercurial > crates > nonstick
view src/libpam/mod.rs @ 139:33b9622ed6d2
Remove redundant memory management in nonstick::libpam; fix UB.
- Uses the libpam-sys-helpers BinaryPayload / OwnedBinaryPayload structs
to handle memory management and parsing for Linux-PAM binary messages.
- Gets rid of the (technically) undefined behavior in PtrPtrVec
due to pointer provenance.
- Don't check for malloc failing. It won't, even if it does.
- Formatting/cleanups/etc.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Thu, 03 Jul 2025 23:57:49 -0400 |
parents | 80c07e5ab22f |
children | a508a69c068a |
line wrap: on
line source
//! The implementation of the PAM interface that wraps `libpam`. //! //! While you're going to want to write PAM modules and applications against //! the interfaces in [the `handle` module](crate::handle) for testability, //! this is (probably) what will be used behind the scenes. #![allow(dead_code)] mod answer; mod conversation; mod environ; mod handle; mod memory; mod module; mod question; #[doc(inline)] pub use handle::{LibPamHandle, OwnedLibPamHandle};