Mercurial > crates > nonstick
comparison src/constants.rs @ 116:a12706e42c9d
Logging, macros, and building:
- Changes logging API to accept the `Location` of the log statement.
Fixes OpenPAM implementation.
- Stops publicly exporting doc macros.
- Uses dlopen to detect the PAM library rather than header jankery.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 29 Jun 2025 18:27:51 -0400 |
parents | 178310336596 |
children |
comparison
equal
deleted
inserted
replaced
115:1e11a52b4665 | 116:a12706e42c9d |
---|---|
4 // between Linux-PAM and OpenPAM header files. | 4 // between Linux-PAM and OpenPAM header files. |
5 #![allow(clippy::unnecessary_cast)] | 5 #![allow(clippy::unnecessary_cast)] |
6 | 6 |
7 #[cfg(feature = "link")] | 7 #[cfg(feature = "link")] |
8 use crate::libpam::pam_ffi; | 8 use crate::libpam::pam_ffi; |
9 use crate::{_linklist, _man7, _manbsd, _xsso}; | 9 use crate::{linklist, man7, manbsd, xsso}; |
10 use bitflags::bitflags; | 10 use bitflags::bitflags; |
11 use libc::c_int; | 11 use libc::c_int; |
12 use num_enum::{IntoPrimitive, TryFromPrimitive}; | 12 use num_enum::{IntoPrimitive, TryFromPrimitive}; |
13 use std::error::Error; | 13 use std::error::Error; |
14 use std::ffi::c_uint; | 14 use std::ffi::c_uint; |
152 /// | 152 /// |
153 /// Instead of being an error code, success is represented by an Ok [`Result`]. | 153 /// Instead of being an error code, success is represented by an Ok [`Result`]. |
154 /// | 154 /// |
155 /// # References | 155 /// # References |
156 /// | 156 /// |
157 #[doc = _linklist!(pam: man7, manbsd)] | 157 #[doc = linklist!(pam: man7, manbsd)] |
158 /// - [X/SSO error code specification][xsso] | 158 /// - [X/SSO error code specification][xsso] |
159 /// | 159 /// |
160 #[doc = _man7!(3 pam "RETURN_VALUES")] | 160 #[doc = man7!(3 pam "RETURN_VALUES")] |
161 #[doc = _manbsd!(3 pam "RETURN%20VALUES")] | 161 #[doc = manbsd!(3 pam "RETURN%20VALUES")] |
162 #[doc = _xsso!("chap5.htm#tagcjh_06_02")] | 162 #[doc = xsso!("chap5.htm#tagcjh_06_02")] |
163 #[allow(non_camel_case_types, dead_code)] | 163 #[allow(non_camel_case_types, dead_code)] |
164 #[derive(Copy, Clone, Debug, PartialEq, TryFromPrimitive, IntoPrimitive)] | 164 #[derive(Copy, Clone, Debug, PartialEq, TryFromPrimitive, IntoPrimitive)] |
165 #[non_exhaustive] // C might give us anything! | 165 #[non_exhaustive] // C might give us anything! |
166 #[repr(i32)] | 166 #[repr(i32)] |
167 pub enum ErrorCode { | 167 pub enum ErrorCode { |