# HG changeset patch # User Paul Fisher # Date 1749537749 14400 # Node ID 5e14bb09385132b32d81021adc8b07fce13e9b32 # Parent a638a45e5f1f07fa05a0e14eedec7f7ba505c182 fix more openpam compat stuff diff -r a638a45e5f1f -r 5e14bb093851 src/constants.rs --- 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. diff -r a638a45e5f1f -r 5e14bb093851 src/libpam/question.rs --- 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;