Mercurial > crates > nonstick
comparison libpam-sys/README.md @ 136:efbc235f01d3
Separate libpam-sys-helpers from libpam-sys.
This separates the parts of libpam-sys that don't need linking against libpam
from the parts that do need to link against libpam.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Thu, 03 Jul 2025 14:28:04 -0400 |
parents | 5b2de52dd8b2 |
children |
comparison
equal
deleted
inserted
replaced
135:b52594841480 | 136:efbc235f01d3 |
---|---|
3 This crate provides low-level access to PAM, working with multiple PAM implementations. | 3 This crate provides low-level access to PAM, working with multiple PAM implementations. |
4 You do not need PAM system headers installed to use this! | 4 You do not need PAM system headers installed to use this! |
5 | 5 |
6 If you're looking for a nice, safe, Rusty API to PAM, may I recommend [nonstick][nonstick]? | 6 If you're looking for a nice, safe, Rusty API to PAM, may I recommend [nonstick][nonstick]? |
7 | 7 |
8 ## Configuration | 8 ## PAM implementations |
9 | 9 |
10 By default, this crate guesses your system's PAM implementation based upon your OS. | 10 This crate detects the PAM implementation you have installed, or guesses based on the OS if that's unavailable. |
11 Supported PAM implementations are defined in the `pam_impl::PamImpl` enum. | |
11 | 12 |
12 - Linux: `LinuxPam` | 13 You can also explicitly specify the PAM implementation you want (if not detected correctly) by setting the `LIBPAMSYS_IMPL` environment variable **at build time**. |
13 - BSDs, including Mac OS: `OpenPam` | 14 All build-time configuration is performed by the build script of the [`libpam-sys-helpers` crate](https://crates.io/crates/libpam-sys-helpers). |
14 - Illumos/Solaris: `Sun` | |
15 - Unknown: `XSso` | |
16 | 15 |
17 Each implementation exports all the functionality available in its respective PAM library. | 16 Each implementation exports all the functionality available in its respective PAM library. |
18 `XSso` exports only what is in the [X/SSO specification][xsso]. | 17 `XSso` exports only what is in the [X/SSO specification][xsso]. |
19 | |
20 ## Cargo Features | |
21 | |
22 The `helpers` feature (optional, but on by default) exports two helpers for PAM memory management. | |
23 | |
24 - A struct for managing the difference in memory management between Linux-PAM and all other implementations. | |
25 - A struct for handling the Linux-PAM–specific binary data payload structure. | |
26 | |
27 Neither are directly referenced elsewhere, and both allow you to bring your own storage abstractions. | |
28 | 18 |
29 ## Testing | 19 ## Testing |
30 | 20 |
31 Tests are mostly run through `libpam-sys-test`, which lives in the crate's workspace in its repository (along with [nonstick]). | 21 Tests are mostly run through `libpam-sys-test`, which lives in the crate's workspace in its repository (along with [nonstick]). |
32 | 22 |