comparison libpam-sys/src/lib.rs @ 125:2b255c92417b

Introduce base PAM functions; use the real X/SSO PAM header for tests.
author Paul Fisher <paul@pfish.zone>
date Mon, 30 Jun 2025 17:47:32 -0400
parents 39760dfc9b3b
children c77846f3a979
comparison
equal deleted inserted replaced
124:f469b8d9ad78 125:2b255c92417b
3 //! ## PAM implementation 3 //! ## PAM implementation
4 //! 4 //!
5 #![doc = concat!("This documentation was built for the **", __pam_impl_name__!(), "** implementation.")] 5 #![doc = concat!("This documentation was built for the **", __pam_impl_name__!(), "** implementation.")]
6 6
7 use libpam_sys_impls::{__pam_impl_enum__, __pam_impl_name__}; 7 use libpam_sys_impls::{__pam_impl_enum__, __pam_impl_name__};
8
9 mod constants;
10 mod functions;
11 pub mod helpers;
12 mod structs;
13 8
14 /// A `cfg`-like attribute macro for code specific to one PAM implementation. 9 /// A `cfg`-like attribute macro for code specific to one PAM implementation.
15 /// 10 ///
16 /// Different versions of PAM export different functions and have some 11 /// Different versions of PAM export different functions and have some
17 /// meaningful internal implementation differences, like the way `pam_conv` 12 /// meaningful internal implementation differences, like the way `pam_conv`
46 /// 41 ///
47 /// [man7]: https://man7.org/linux/man-pages/man3/pam_conv.3.html 42 /// [man7]: https://man7.org/linux/man-pages/man3/pam_conv.3.html
48 #[doc(inline)] 43 #[doc(inline)]
49 pub use libpam_sys_impls::cfg_pam_impl; 44 pub use libpam_sys_impls::cfg_pam_impl;
50 45
46 mod constants;
47 // We get `funcs` from different places depending upon the PAM implementation.
48 // This is because
49 #[path = "funcs/xsso_base.rs"]
50 mod funcs;
51 pub mod helpers;
52 mod structs;
53
54 #[doc(inline)]
55 pub use crate::{constants::*, funcs::*, structs::*};
56
51 // Looking for the actual code defining this enum? 57 // Looking for the actual code defining this enum?
52 // It's in the build.rs file for libpam_sys_impls. 58 // It's in the build.rs file for libpam_sys_impls.
53 __pam_impl_enum__!(#[non_exhaustive]); 59 __pam_impl_enum__!(#[non_exhaustive]);
54
55 #[doc(inline)]
56 pub use crate::{constants::*, structs::*};