Mercurial > crates > nonstick
annotate libpam-sys/src/lib.rs @ 197:705d633e4966 default tip
Added tag libpam-sys/v0.2.0 for changeset 568faf823f34
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 03 Aug 2025 01:10:19 -0400 |
parents | e915c54097d6 |
children |
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. |
189
b2456d274576
Add line breaks that rustfmt ate back to documentation.
Paul Fisher <paul@pfish.zone>
parents:
176
diff
changeset
|
11 #![doc = ""] |
190
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
12 #![doc = concat!("This documentation was built for the **", env!("LIBPAMSYS_IMPL"), "** implementation.")] |
136
efbc235f01d3
Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents:
134
diff
changeset
|
13 //! |
efbc235f01d3
Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents:
134
diff
changeset
|
14 //! 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
|
15 //! environment variable to one of the values of the [`pam_impl::PamImpl`] enum. |
190
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
16 //! For more information about configuration, see [the documentation of |
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
17 //! libpam-sys-impls](libpam_sys_impls::build_target_impl). |
125
2b255c92417b
Introduce base PAM functions; use the real X/SSO PAM header for tests.
Paul Fisher <paul@pfish.zone>
parents:
119
diff
changeset
|
18 #![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
|
19 #![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
|
20 |
148
4b3a5095f68c
Move libpam-sys helpers into their own library.
Paul Fisher <paul@pfish.zone>
parents:
138
diff
changeset
|
21 pub mod aliases; |
176
0730f5f2ee2a
Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents:
174
diff
changeset
|
22 mod constants; |
0730f5f2ee2a
Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents:
174
diff
changeset
|
23 mod ffi; |
136
efbc235f01d3
Separate libpam-sys-helpers from libpam-sys.
Paul Fisher <paul@pfish.zone>
parents:
134
diff
changeset
|
24 #[doc(inline)] |
176
0730f5f2ee2a
Turn `libpam-sys-consts` back into `libpam-sys-impls`.
Paul Fisher <paul@pfish.zone>
parents:
174
diff
changeset
|
25 pub use crate::{constants::*, ffi::*}; |
190
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
26 |
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
27 /// Information about the current PAM implementation (or the implementation |
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
28 /// that is being built for). |
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
29 pub mod pam_impl { |
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
30 #[doc(inline)] |
191
e915c54097d6
Clean up docs and link versions to the right place.
Paul Fisher <paul@pfish.zone>
parents:
190
diff
changeset
|
31 pub use libpam_sys_impls::{enable_pam_impl_cfg, pam_impl_cfg_string, PamImpl}; |
190
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
32 |
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
33 include!(concat!(env!("OUT_DIR"), "/pam_impl_consts.rs")); |
995aca290452
Restructure the way libpam-sys-impls works to fix cross-compilation.
Paul Fisher <paul@pfish.zone>
parents:
189
diff
changeset
|
34 } |