Mercurial > crates > nonstick
diff libpam-sys/src/constants.rs @ 110:2346fd501b7a
Add tests for constants and do other macro niceties.
- Adds tests for all the constants. Pretty sweet.
- Moves documentation for cfg-pam-impl macro to `libpam-sys`.
- Renames `Illumos` to `Sun`.
- other stuff
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 29 Jun 2025 02:15:46 -0400 |
parents | bb465393621f |
children | 82995b4dccee |
line wrap: on
line diff
--- a/libpam-sys/src/constants.rs Sat Jun 28 02:49:35 2025 -0400 +++ b/libpam-sys/src/constants.rs Sun Jun 29 02:15:46 2025 -0400 @@ -1,4 +1,7 @@ //! All the constants. +//! +//! These constants are tested on a per-platform basis by `libpam-sys-test`'s +//! `test_constants.rs`. use libpam_sys_impls::cfg_pam_impl; @@ -71,6 +74,7 @@ PAM_NO_MODULE_DATA = 18; PAM_CONV_ERR = 19; PAM_AUTHTOK_ERR = 20; + PAM_AUTHTOK_RECOVER_ERR = 21; PAM_AUTHTOK_RECOVERY_ERR = 21; PAM_AUTHTOK_LOCK_BUSY = 22; PAM_AUTHTOK_DISABLE_AGING = 23; @@ -106,7 +110,7 @@ PAM_FAIL_DELAY = 10; PAM_XDISPLAY = 11; PAM_XAUTHDATA = 12; - PAM_AUTHTOKTYPE = 13; + PAM_AUTHTOK_TYPE = 13; ); /// To suppress messages in the item cleanup function. @@ -184,10 +188,10 @@ } /// Constants exclusive to Illumos. -#[cfg_pam_impl("Illumos")] -pub use illumos::*; -#[cfg_pam_impl("Illumos")] -mod illumos { +#[cfg_pam_impl("Sun")] +pub use sun::*; +#[cfg_pam_impl("Sun")] +mod sun { /// The total number of PAM error codes. pub const PAM_TOTAL_ERRNUM: u32 = 28; @@ -227,5 +231,3 @@ pub const PAM_NUM_ITEMS: u32 = 14; } -#[cfg(test)] -mod test {}