Mercurial > crates > nonstick
comparison libpam-sys/README.md @ 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 | 180237d0b498 |
| children |
comparison
equal
deleted
inserted
replaced
| 175:e30775c80b49 | 176:0730f5f2ee2a |
|---|---|
| 11 | 11 |
| 12 Supported PAM implementations are defined in the `pam_impl::PamImpl` enum. | 12 Supported PAM implementations are defined in the `pam_impl::PamImpl` enum. |
| 13 | 13 |
| 14 This crate automatically chooses the appropriate PAM implementation you are most likely to need installed based on the target OS. | 14 This crate automatically chooses the appropriate PAM implementation you are most likely to need installed based on the target OS. |
| 15 You can also explicitly specify the PAM implementation you want (if not detected correctly) by setting the `LIBPAMSYS_IMPL` environment variable **at build time**. | 15 You can also explicitly specify the PAM implementation you want (if not detected correctly) by setting the `LIBPAMSYS_IMPL` environment variable **at build time**. |
| 16 All build-time configuration is performed by the build script of the [`libpam-sys-consts` crate](https://crates.io/crates/libpam-sys-consts). | 16 All build-time configuration is performed by the build script of the [`libpam-sys-impls` crate](https://crates.io/crates/libpam-sys-impls). |
| 17 | 17 |
| 18 Normally, this crate exports all functionality available in the selected PAM library. | 18 Normally, this crate exports all functionality available in the selected PAM library. |
| 19 `XSso` exports only the subset of the [X/SSO specification][xsso] supported by both OpenPAM and Sun PAM. | 19 `XSso` exports only the subset of the [X/SSO specification][xsso] supported by both OpenPAM and Sun PAM. |
| 20 | 20 |
| 21 ### Changing behavior based on PAM implementation | 21 ### Changing behavior based on PAM implementation |
| 41 | 41 |
| 42 #[cfg(any(pam_impl = "LinuxPam", pam_impl = "OpenPam"))] | 42 #[cfg(any(pam_impl = "LinuxPam", pam_impl = "OpenPam"))] |
| 43 fn some_func() { /* Linux-PAM / OpenPAM implementation */ } | 43 fn some_func() { /* Linux-PAM / OpenPAM implementation */ } |
| 44 ``` | 44 ``` |
| 45 | 45 |
| 46 Further documentation on this is available in `libpam-sys-consts`. | 46 Further documentation on this is available in `libpam-sys-impls`. |
| 47 | 47 |
| 48 ## Testing | 48 ## Testing |
| 49 | 49 |
| 50 Tests are mostly run through `libpam-sys-test`, which lives in the crate's workspace in its repository (along with [nonstick]). | 50 Tests are mostly run through `libpam-sys-test`, which lives in the crate's workspace in its repository (along with [nonstick]). |
| 51 | 51 |
