annotate libpam-sys/src/lib.rs @ 176:0730f5f2ee2a

Turn `libpam-sys-consts` back into `libpam-sys-impls`. This moves the constants into `libpam-sys` and makes `libpam-sys-impls` responsible solely for detecting the current PAM implementation.
author Paul Fisher <paul@pfish.zone>
date Wed, 30 Jul 2025 17:53:31 -0400
parents 9e4ce1631bd3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
148
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
1 //! `libpam-sys` provides low-level access to LibPAM.
136
efbc235f01d3 Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents: 134
diff changeset
2 //!
148
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
3 //! Everything in here is directly as exported from the LibPAM library or
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
4 //! its header files, with two exceptions:
131
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 130
diff changeset
5 //!
148
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
6 //! - The [`pam_impl`] submodule (and the associated [`pam_impl_name!`] macro),
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
7 //! which can be used to detect the current PAM implementation.
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
8 //! - The [`aliases`] submodule, which contains convenient aliases
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
9 //! for callback types used in libpam, so you don't have to type
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
10 //! `unsafe extern "C" fn(this is so long)` all the time.
136
efbc235f01d3 Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents: 134
diff changeset
11 #![doc = concat!("This documentation was built for the **", pam_impl_name!(), "** implementation.")]
efbc235f01d3 Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents: 134
diff changeset
12 //!
efbc235f01d3 Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents: 134
diff changeset
13 //! You can override this **at build time** by setting the `LIBPAMSYS_IMPL`
efbc235f01d3 Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents: 134
diff changeset
14 //! environment variable to one of the values of the [`pam_impl::PamImpl`] enum.
148
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
15 //! For more information about configuration, see the documentation of
176
0730f5f2ee2a Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents: 174
diff changeset
16 //! [`libpam-sys-impls`](https://crates.io/crates/libpam-sys-impls).
125
2b255c92417b Introduce base PAM functions; use the real X/SSO PAM header for tests.
Paul Fisher <paul@pfish.zone>
parents: 119
diff changeset
17 #![allow(non_camel_case_types)]
131
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 130
diff changeset
18 #![allow(unused_imports)]
125
2b255c92417b Introduce base PAM functions; use the real X/SSO PAM header for tests.
Paul Fisher <paul@pfish.zone>
parents: 119
diff changeset
19
148
4b3a5095f68c Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents: 138
diff changeset
20 pub mod aliases;
176
0730f5f2ee2a Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents: 174
diff changeset
21 mod constants;
0730f5f2ee2a Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents: 174
diff changeset
22 mod ffi;
136
efbc235f01d3 Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents: 134
diff changeset
23 #[doc(inline)]
176
0730f5f2ee2a Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents: 174
diff changeset
24 pub use crate::{constants::*, ffi::*};
0730f5f2ee2a Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents: 174
diff changeset
25 #[doc(inline)]
0730f5f2ee2a Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents: 174
diff changeset
26 pub use libpam_sys_impls as pam_impl;
0730f5f2ee2a Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents: 174
diff changeset
27 #[doc(inline)]
0730f5f2ee2a Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents: 174
diff changeset
28 pub use libpam_sys_impls::pam_impl_name;