comparison src/lib.rs @ 98:b87100c5eed4

Start on environment variables, and make pointers nicer. This starts work on the PAM environment handling, and in so doing, introduces the CHeapBox and CHeapString structs. These are analogous to Box and CString, but they're located on the C heap rather than being Rust-managed memory. This is because environment variables deal with even more pointers and it turns out we can lose a lot of manual freeing using homemade smart pointers.
author Paul Fisher <paul@pfish.zone>
date Tue, 24 Jun 2025 04:25:25 -0400
parents f3e260f9ddcb
children 3f11b8d30f63
comparison
equal deleted inserted replaced
97:efe2f5f8b5b2 98:b87100c5eed4
29 pub mod conv; 29 pub mod conv;
30 pub mod module; 30 pub mod module;
31 31
32 pub mod handle; 32 pub mod handle;
33 33
34 mod environ;
34 #[cfg(feature = "link")] 35 #[cfg(feature = "link")]
35 mod libpam; 36 mod libpam;
36 pub mod logging; 37 pub mod logging;
37 38
38 #[cfg(feature = "link")] 39 #[cfg(feature = "link")]
40 #[doc(inline)]
39 pub use crate::libpam::{LibPamHandle, OwnedLibPamHandle}; 41 pub use crate::libpam::{LibPamHandle, OwnedLibPamHandle};
40 #[doc(inline)] 42 #[doc(inline)]
41 pub use crate::{ 43 pub use crate::{
42 constants::{ErrorCode, Flags, Result}, 44 constants::{ErrorCode, Flags, Result},
43 conv::{BinaryData, Conversation, ConversationAdapter}, 45 conv::{BinaryData, Conversation, ConversationAdapter},
46 environ::EnvironMap,
44 handle::{PamHandleApplication, PamHandleModule, PamShared}, 47 handle::{PamHandleApplication, PamHandleModule, PamShared},
45 module::PamModule, 48 module::PamModule,
46 }; 49 };