comparison src/logging.rs @ 171:e27c5c667a5a

Create full new types for return code and flags, separate end to end. This plumbs the ReturnCode and RawFlags types through the places where we call into or are called from PAM. Also adds Sun documentation to the project.
author Paul Fisher <paul@pfish.zone>
date Fri, 25 Jul 2025 20:52:14 -0400
parents 634cd5f2ac8b
children 9e4ce1631bd3
comparison
equal deleted inserted replaced
170:f052e2417195 171:e27c5c667a5a
1 //! PAM logging variables and macros. 1 //! PAM logging variables and macros.
2 //! 2 //!
3 //! PAM implementations usually include the ability to log to syslog in a way 3 //! PAM implementations usually include the ability to log to syslog in a way
4 //! that is associated with the log entry itself. This module defines the enums 4 //! that is associated with the log entry itself. This module defines
5 //! and macros for logging. 5 //! the interface we use for logging.
6 //!
7 //! For more details, see [`PamShared::log`](crate::PamShared::log).
8 //! 6 //!
9 //! We can't use [the `log` crate](https://docs.rs/log) because that requires 7 //! We can't use [the `log` crate](https://docs.rs/log) because that requires
10 //! that any `Log` implementors be `Sync` and `Send`, and a PAM handle 8 //! that any `Log` implementors be `Sync` and `Send`, and a PAM handle
11 //! may be neither. Furthermore, PAM handles are passed to PAM modules in 9 //! may be neither. Furthermore, PAM handles are passed to PAM modules in
12 //! dynamic libraries, and `log` doesn't work across dynamic linking boundaries. 10 //! dynamic libraries, and `log` doesn't work across dynamic linking boundaries.