Mercurial > crates > nonstick
comparison src/libpam/question.rs @ 106:49d9e2b5c189
An irresponsible mix of implementing libpam-sys and other stuff.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Thu, 26 Jun 2025 22:41:28 -0400 |
parents | 13b4d2a19674 |
children | e97534be35e3 |
comparison
equal
deleted
inserted
replaced
105:13b4d2a19674 | 106:49d9e2b5c189 |
---|---|
1 //! Data and types dealing with PAM messages. | 1 //! Data and types dealing with PAM messages. |
2 | 2 |
3 use std::cell::Cell; | |
4 #[cfg(feature = "linux-pam-extensions")] | 3 #[cfg(feature = "linux-pam-extensions")] |
5 use crate::conv::{BinaryQAndA, RadioQAndA}; | 4 use crate::conv::{BinaryQAndA, RadioQAndA}; |
6 use crate::conv::{ErrorMsg, InfoMsg, MaskedQAndA, Message, QAndA}; | 5 use crate::conv::{ErrorMsg, InfoMsg, MaskedQAndA, Message, QAndA}; |
7 use crate::libpam::conversation::OwnedMessage; | 6 use crate::libpam::conversation::OwnedMessage; |
8 use crate::libpam::memory::{CBinaryData, CHeapBox, CHeapString, Immovable}; | 7 use crate::libpam::memory::{CBinaryData, CHeapBox, CHeapString, Immovable}; |
9 use crate::libpam::pam_ffi; | 8 use crate::libpam::pam_ffi; |
10 pub use crate::libpam::pam_ffi::Question; | 9 pub use crate::libpam::pam_ffi::Question; |
11 use crate::ErrorCode; | 10 use crate::ErrorCode; |
12 use crate::Result; | 11 use crate::Result; |
13 use num_enum::{IntoPrimitive, TryFromPrimitive}; | 12 use num_enum::{IntoPrimitive, TryFromPrimitive}; |
13 use std::cell::Cell; | |
14 use std::ffi::{c_void, CStr}; | 14 use std::ffi::{c_void, CStr}; |
15 use std::pin::Pin; | 15 use std::pin::Pin; |
16 use std::{ptr, slice}; | 16 use std::{ptr, slice}; |
17 | 17 |
18 /// Abstraction of a collection of questions to be sent in a PAM conversation. | 18 /// Abstraction of a collection of questions to be sent in a PAM conversation. |