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 associatedpam_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 typeunsafe 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§
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 ⚠