comparison src/lib.rs @ 69:8f3ae0c7ab92

Rework conversation data types and make safe wrappers. This removes the old `Conversation` type and reworks the FFI types used for PAM conversations. This creates safe `TestResponse` and `BinaryResponse` structures in `conv`, providing a safe way to pass response messages to PAM Conversations. The internals of these types are allocated on the C heap, as required by PAM. We also remove the Conversation struct, which was specific to the real PAM implementation so that we can introduce a better abstraction. Also splits a new `PamApplicationHandle` trait from `PamHandle`, for the parts of a PAM handle that are specific to the application side of a PAM transaction.
author Paul Fisher <paul@pfish.zone>
date Sun, 01 Jun 2025 01:15:04 -0400
parents a674799a5cd3
children 9f8381a1c09c
comparison
equal deleted inserted replaced
68:e4e7d68234d0 69:8f3ae0c7ab92
33 mod pam_ffi; 33 mod pam_ffi;
34 34
35 #[doc(inline)] 35 #[doc(inline)]
36 pub use crate::{ 36 pub use crate::{
37 constants::{ErrorCode, Flags, Result}, 37 constants::{ErrorCode, Flags, Result},
38 handle::{LibPamHandle, PamHandle, PamModuleHandle}, 38 handle::{LibPamHandle, PamApplicationHandle, PamHandle, PamModuleHandle},
39 module::PamModule, 39 module::PamModule,
40 }; 40 };