Mercurial > crates > nonstick
view README.md @ 69:8f3ae0c7ab92
Rework conversation data types and make safe wrappers.
This removes the old `Conversation` type and reworks the FFI types
used for PAM conversations.
This creates safe `TestResponse` and `BinaryResponse` structures in `conv`,
providing a safe way to pass response messages to PAM Conversations.
The internals of these types are allocated on the C heap, as required by PAM.
We also remove the Conversation struct, which was specific to the real PAM
implementation so that we can introduce a better abstraction.
Also splits a new `PamApplicationHandle` trait from `PamHandle`,
for the parts of a PAM handle that are specific to the application side
of a PAM transaction.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 01 Jun 2025 01:15:04 -0400 |
parents | d83623951070 |
children | c9fc7e6257d3 |
line wrap: on
line source
# 🍳 nonstick Nonstick lets you use PAM (Pluggable Authentication Modules) from Rust without getting stuck in unsafe code. ## Status This is currently very incomplete. It only provides functionality for developing your own PAM authentication module (i.e., a backend that PAM calls to authenticate a user or do something similar). A very immature implementation of the PAM Conversation structure is gated behind the `experimental` feature. At the moment, [Linux-PAM](https://github.com/linux-pam/linux-pam) is the only supported PAM implementation. *If you’re looking for a library to implement a PAM client* (i.e., something that authenticates using PAM), consider the [`pam` crate](https://crates.io/crates/pam). APIs are likely to break before v0.1.0, and thereafter should stabilize to an eventual 1.0 release. Goals include: - Bindings for PAM clients. - A robust and mature implementation of Conversation. - Support for non–Linux-PAM implementations. ## Credits This is a direct fork of [Anthony Nowell](http://anowell.com/)’s [`pam-rs`/`pam-bindings` crate](https://crates.io/crates/pam-bindings). `pam-rs` was in turn inspired by: - [`rust-pam` by tozny](https://github.com/tozny/rust-pam) - [`pam_groupmap` by ndenev](https://github.com/ndenev/pam_groupmap) - [`pam-http` by beatgammit](https://github.com/beatgammit/pam-http)