Mercurial > crates > nonstick
changeset 85:5e14bb093851
fix more openpam compat stuff
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 10 Jun 2025 02:42:29 -0400 |
parents | a638a45e5f1f |
children | 23162cd399aa |
files | src/constants.rs src/libpam/question.rs |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/constants.rs Tue Jun 10 02:35:11 2025 -0400 +++ b/src/constants.rs Tue Jun 10 02:42:29 2025 -0400 @@ -14,7 +14,7 @@ /// any PAM implementations. Applications should always use the symbolic value /// and not a magic number.** #[cfg(not(feature = "link"))] -mod ffi { +mod pam_ffi { macro_rules! define { ($(#[$attr:meta])* $($name:ident = $value:expr),+) => { define!( @@ -84,24 +84,24 @@ #[repr(transparent)] pub struct Flags: c_uint { /// The module should not generate any messages. - const SILENT = pam_ffi::PAM_SILENT; + const SILENT = pam_ffi::PAM_SILENT as u32; /// The module should return [ErrorCode::AuthError] /// if the user has an empty authentication token /// rather than immediately accepting them. - const DISALLOW_NULL_AUTHTOK = pam_ffi::PAM_DISALLOW_NULL_AUTHTOK; + const DISALLOW_NULL_AUTHTOK = pam_ffi::PAM_DISALLOW_NULL_AUTHTOK as u32; // Flag used for `set_credentials`. /// Set user credentials for an authentication service. - const ESTABLISH_CREDENTIALS = pam_ffi::PAM_ESTABLISH_CRED; + const ESTABLISH_CREDENTIALS = pam_ffi::PAM_ESTABLISH_CRED as u32; /// Delete user credentials associated with /// an authentication service. - const DELETE_CREDENTIALS = pam_ffi::PAM_DELETE_CRED; + const DELETE_CREDENTIALS = pam_ffi::PAM_DELETE_CRED as u32; /// Reinitialize user credentials. - const REINITIALIZE_CREDENTIALS = pam_ffi::PAM_REINITIALIZE_CRED; + const REINITIALIZE_CREDENTIALS = pam_ffi::PAM_REINITIALIZE_CRED as u32; /// Extend the lifetime of user credentials. - const REFRESH_CREDENTIALS = pam_ffi::PAM_REFRESH_CRED; + const REFRESH_CREDENTIALS = pam_ffi::PAM_REFRESH_CRED as u32; // Flags used for password changing.
--- a/src/libpam/question.rs Tue Jun 10 02:35:11 2025 -0400 +++ b/src/libpam/question.rs Tue Jun 10 02:42:29 2025 -0400 @@ -158,7 +158,7 @@ /// This is kept separate to provide a place where we can separate /// the pointer-to-pointer-to-list from pointer-to-list-of-pointers. #[cfg(not(pam_impl = "linux-pam"))] -pub type Indirect = XssoIndirect; +pub type Indirect = XSsoIndirect; pub type Questions = GenericQuestions<Indirect>;