Mercurial > crates > nonstick
changeset 132:0b6a17f8c894 default tip
Get constant test working again with OpenPAM.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Wed, 02 Jul 2025 02:34:29 -0400 |
parents | a632a8874131 |
children | |
files | libpam-sys/libpam-sys-test/build.rs libpam-sys/src/constants.rs |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpam-sys/libpam-sys-test/build.rs Wed Jul 02 02:24:21 2025 -0400 +++ b/libpam-sys/libpam-sys-test/build.rs Wed Jul 02 02:34:29 2025 -0400 @@ -100,7 +100,7 @@ if let Some(stripped) = name.strip_prefix(&format!("{REDIR_FD}_")) { format!("assert_eq!(generated::{name} as i32, libpam_sys::{REDIR_FD}::{stripped}.into());") } else { - format!("assert_eq!(generated::{name}, libpam_sys::{name});") + format!("assert_eq!(generated::{name} as i32, libpam_sys::{name});") } }), );
--- a/libpam-sys/src/constants.rs Wed Jul 02 02:24:21 2025 -0400 +++ b/libpam-sys/src/constants.rs Wed Jul 02 02:34:29 2025 -0400 @@ -251,6 +251,18 @@ PAM_LOG_NOTICE, PAM_LOG_ERROR, ); + + c_enum!( + /// PAM primitives. + PAM_SM_AUTHENTICATE, + PAM_SM_SETCRED, + PAM_SM_ACCT_MGMT, + PAM_SM_OPEN_SESSION, + PAM_SM_CLOSE_SESSION, + PAM_SM_CHAUTHTOK, + ); + /// The number of PAM primitives. + pub const PAM_NUM_PRIMITIVES: i32 = 6; } /// Constants exclusive to Illumos.