pam-bindings
Simplified PAM module creation in Rust.
use ;
use ;
use CStr;
;
pam_hooks!;
Introduction
The Pluggable Authentication Modules (PAM) framework enables systems to authenticate users and perform other functions by composing PAM modules, which are distributed as shared libraries.
The goal of this library is to provide a simple, type-safe API to write these modules.
Usage
Add pam-bindings to your dependencies in Cargo.toml:
[]
= "0.3.0"
Examples
Example PAM modules can be found under pam/examples.
Running an example
The exact paths and package names below may vary by distribution.
# Install prerequisites
# Build an example PAM module
# This walkthrough uses the "username" example module
example=username
# Register a PAM service that loads the module
service=test-pam-service
facility=session
# Test the relevant PAM operation
operation=open_session
# Clean up
Acknowledgements
The initial contents of this repository were heavily borrowed from: