Crate libpam_sys

Source
Expand description

libpam-sys provides low-level access to LibPAM.

Everything in here is directly as exported from the LibPAM library or its header files, with two exceptions:

  • The pam_impl submodule (and the associated pam_impl_name! macro), which can be used to detect the current PAM implementation.
  • The aliases submodule, which contains convenient aliases for callback types used in libpam, so you don’t have to type unsafe extern "C" fn(this is so long) all the time.

This documentation was built for the LinuxPam implementation.

You can override this at build time by setting the LIBPAMSYS_IMPL environment variable to one of the values of the pam_impl::PamImpl enum. For more information about configuration, see the documentation of libpam-sys-impls.

Re-exports§

pub use pam_modutil_redirect_fd::*;

Modules§

aliases
Convenience aliases for complex types in PAM.
pam_impl
Information about the current PAM implementation (or the implementation that is being built for).

Macros§

pam_impl_name
The name of the PAM implementation this library was built against, as a string.

Structs§

pam_conv
Used by PAM to communicate between the module and the application.
pam_handle
An opaque structure that PAM uses to communicate.
pam_message
A message sent into a PAM conversation.
pam_modutil_privs
pam_response
A response returned from a PAM conversation.
pam_xauth_data
Definition of the PAM_XAUTHDATA item. Compatible with xcb_auth_info_t.

Enums§

pam_modutil_redirect_fd

Constants§

PAM_ABORT
An error return code.
PAM_ACCT_EXPIRED
An error return code.
PAM_AUTHINFO_UNAVAIL
An error return code.
PAM_AUTHTOK
An item type.
PAM_AUTHTOK_DISABLE_AGING
An error return code.
PAM_AUTHTOK_ERR
An error return code.
PAM_AUTHTOK_EXPIRED
An error return code.
PAM_AUTHTOK_LOCK_BUSY
An error return code.
PAM_AUTHTOK_RECOVERY_ERR
An error return code.
PAM_AUTHTOK_TYPE
An item type (Linux-only).
PAM_AUTH_ERR
An error return code.
PAM_BAD_ITEM
An error return code.
PAM_BINARY_PROMPT
A message style.
PAM_BUF_ERR
An error return code.
PAM_CHANGE_EXPIRED_AUTHTOK
A flag value.
PAM_CONV
An item type.
PAM_CONV_AGAIN
An error return code.
PAM_CONV_ERR
An error return code.
PAM_CRED_ERR
An error return code.
PAM_CRED_EXPIRED
An error return code.
PAM_CRED_INSUFFICIENT
An error return code.
PAM_CRED_UNAVAIL
An error return code.
PAM_DATA_REPLACE
A flag value.
PAM_DATA_SILENT
To suppress messages in the item cleanup function.
PAM_DELETE_CRED
A flag value.
PAM_DISALLOW_NULL_AUTHTOK
A flag for pam_authenticate.
PAM_ERROR_MSG
A message style.
PAM_ESTABLISH_CRED
A flag value.
PAM_FAIL_DELAY
An item type (Linux-only).
PAM_IGNORE
An error return code.
PAM_INCOMPLETE
An error return code.
PAM_MAXTRIES
An error return code.
PAM_MAX_MSG_SIZE
Maximum size of PAM conversation elements (suggested).
PAM_MAX_NUM_MSG
Maximum size of PAM conversation elements (suggested).
PAM_MAX_RESP_SIZE
Maximum size of PAM conversation elements (suggested).
PAM_MODULE_UNKNOWN
An error return code.
PAM_MODUTIL_NGROUPS
PAM_NEW_AUTHTOK_REQD
An error return code.
PAM_NO_MODULE_DATA
An error return code.
PAM_OLDAUTHTOK
An item type.
PAM_OPEN_ERR
An error return code.
PAM_PERM_DENIED
An error return code.
PAM_PRELIM_CHECK
A flag value.
PAM_PROMPT_ECHO_OFF
A message style.
PAM_PROMPT_ECHO_ON
A message style.
PAM_RADIO_TYPE
A message style.
PAM_REFRESH_CRED
A flag value.
PAM_REINITIALIZE_CRED
A flag value.
PAM_RHOST
An item type.
PAM_RUSER
An item type.
PAM_SERVICE
An item type.
PAM_SERVICE_ERR
An error return code.
PAM_SESSION_ERR
An error return code.
PAM_SILENT
A flag value.
PAM_SUCCESS
The successful return code.
PAM_SYMBOL_ERR
An error return code.
PAM_SYSTEM_ERR
An error return code.
PAM_TEXT_INFO
A message style.
PAM_TRY_AGAIN
An error return code.
PAM_TTY
An item type.
PAM_UPDATE_AUTHTOK
A flag value.
PAM_USER
An item type.
PAM_USER_PROMPT
An item type.
PAM_USER_UNKNOWN
An error return code.
PAM_XAUTHDATA
An item type (Linux-only).
PAM_XDISPLAY
An item type (Linux-only).
_PAM_RETURN_VALUES
An error return code.

Functions§

pam_acct_mgmt
Account validation.
pam_authenticate
Authenticate a user.
pam_chauthtok
Manage authentication tokens.
pam_close_session
Close an opened user session.
pam_end
Ends the PAM transaction.
pam_fail_delay
pam_get_authtok
Gets PAM_AUTHTOK, or asks the user if that is unset.
pam_get_authtok_noverify
pam_get_authtok_verify
pam_get_data
Gets module-specific data. PAM still owns the data.
pam_get_item
Get information about the transaction.
pam_get_user
Get the username. PAM owns it.
pam_getenv
Gets an environment variable. You own the return value.
pam_getenvlist
Gets all the environment variables. You own everything it points to.
pam_modutil_audit_write
pam_modutil_check_user_in_passwd
pam_modutil_drop_priv
pam_modutil_getgrgid
pam_modutil_getgrnam
pam_modutil_getlogin
pam_modutil_getpwnam
pam_modutil_getpwuid
pam_modutil_getspnam
pam_modutil_read
pam_modutil_regain_priv
pam_modutil_sanitize_helper_fds
pam_modutil_search_key
pam_modutil_user_in_group_nam_gid
pam_modutil_user_in_group_nam_nam
pam_modutil_user_in_group_uid_gid
pam_modutil_user_in_group_uid_nam
pam_modutil_write
pam_open_session
Opens a user session.
pam_prompt
pam_putenv
Sets the value of an environment variable. namevalue is copied.
pam_set_data
Set module-specific data. PAM will call cleanup when completed.
pam_set_item
Set information about the transaction. The item is copied.
pam_setcred
Update or delete user credentials.
pam_start
Starts a PAM transaction. The conv may or may not be copied.
pam_start_confdir
Start a PAM transaction based on configuration in the given directory.
pam_strerror
Gets a statically-allocated error string.
pam_syslog