Mercurial > crates > nonstick
diff src/constants.rs @ 87:05291b601f0a
Well and truly separate the Linux extensions.
This separates the Linux extensions on the libpam side,
and disables the two enums on the interface side.
Users can still call the Linux extensions from non-Linux PAM impls,
but they'll get a conversation error back.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 10 Jun 2025 04:40:01 -0400 |
parents | 23162cd399aa |
children |
line wrap: on
line diff
--- a/src/constants.rs Tue Jun 10 02:43:31 2025 -0400 +++ b/src/constants.rs Tue Jun 10 04:40:01 2025 -0400 @@ -1,5 +1,9 @@ //! Constants and enum values from the PAM library. +// We have a lot of dumb casts that we just gotta do because of differences +// between Linux-PAM and OpenPAM header files. +#![allow(clippy::unnecessary_cast)] + #[cfg(feature = "link")] use crate::libpam::pam_ffi; use bitflags::bitflags; @@ -198,8 +202,10 @@ ModuleUnknown = pam_ffi::PAM_MODULE_UNKNOWN, #[error("bad item passed to pam_[whatever]_item")] BadItem = pam_ffi::PAM_BAD_ITEM, + #[cfg(feature = "linux-pam-extensions")] #[error("conversation function is event-driven and data is not available yet")] ConversationAgain = pam_ffi::PAM_CONV_AGAIN, + #[cfg(feature = "linux-pam-extensions")] #[error("call this function again to complete authentication stack")] Incomplete = pam_ffi::PAM_INCOMPLETE, }