Crate pam

source ·
Expand description

Rustified API to the Linux-PAM authentication libary

This library supports both PAM clients and modules through the respective cargo features. If you do not want to use any high-level API, wrappers for the raw PAM related functions from pam_sys are also exported at crate root.

Re-exports

Modules

  • Authentication related structure and functions

Structs

  • PAM related error with PamReturnCode inside it
  • A minimalistic conversation handler, that uses given login and password

Enums

Traits

  • A trait representing the PAM authentification conversation

Functions

  • Determine if the user’s account is valid
  • Authenticate the user via the Conversation passed to start
  • Change the authentication token for the user associated with the PAM transaction
  • Indicate that an authenticated user session has ended
  • Terminate the PAM transaction
  • Retrieve PAM information of type item_type from the associated PAM transaction
  • Get he value of a PAM environment variable associated with the PAM transaction
  • Retrieve a complee copy of the PAM environment associated with the PAM transaction
  • Update the PAM environment via the supplied list
  • Add or change PAM environment variables associated with the PAM transaction in BSD style “name=value”
  • Set up a user session for a previously authenticated user
  • Add or change PAM environment variables associated with the PAM transaction
  • Update PAM information of type item_type in the associated PAM transaction
  • Modify the credentials of the user associated with the PAM transaction
  • Create the PAM context and initiate the PAM transaction
  • Retrieve a CStr describing the PamReturnCode passed, potentially using LC_MESSAGES to localize the result

Type Aliases

  • Opaque PAM main structure. Used for nearly all application functions
  • PAM message that is passed to modules
  • PAM response returned by modules
  • Convenience type for functions that might fail with a PamError