Mercurial > crates > nonstick
diff src/constants.rs @ 92:5ddbcada30f2
Add the ability to log against a PAM handle.
PAM impls provide a way to log to syslog. This exposes it via nonstick.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 22 Jun 2025 19:29:32 -0400 |
parents | f6186e41399b |
children | efe2f5f8b5b2 |
line wrap: on
line diff
--- a/src/constants.rs Wed Jun 18 16:30:41 2025 -0400 +++ b/src/constants.rs Sun Jun 22 19:29:32 2025 -0400 @@ -22,6 +22,8 @@ /// and not a magic number.** #[cfg(not(feature = "link"))] mod pam_ffi { + use std::ffi::c_uint; + macro_rules! define { ($(#[$attr:meta])* $($name:ident = $value:expr),+) => { define!( @@ -81,7 +83,9 @@ PAM_USER_UNKNOWN = 553 ); - fn strerror(val: c_uint) -> Option<&'static str> { + /// Dummy implementation of strerror so that it always returns None. + pub fn strerror(val: c_uint) -> Option<&'static str> { + _ = val; None } }