Struct pamsm::Pam

source · []
#[repr(transparent)]
pub struct Pam(_);
Expand description

Opaque PAM handle, with additional native methods available via PamLibExt.

Trait Implementations

Get the username. If the PAM_USER item is not set, this function prompts for a username (like get_authtok). Returns PamError::SERVICE_ERR if the prompt contains any null byte Read more

Get the username, i.e. the PAM_USER item. If it’s not set return None.

Get the cached authentication token.

Get the cached old authentication token.

Get the cached authentication token or prompt the user for one if there isn’t any. Returns PamError::SERVICE_ERR if the prompt contains any null byte Read more

Get the remote hostname.

Get the remote username.

Get the service name.

Prompt the user for custom input. Returns PamError::SERVICE_ERR if the prompt contains any null byte Read more

Get a variable from the pam environment list.

Put a variable in the pam environment list. name_value takes for form documented in pam_putent(3) : Read more

Send data to be stored by the pam library under the name module_name. The data can then be retrieved from a different callback in this module, or even by a different module using retrieve_data<T>. Read more

Retrieve data previously stored with send_data<T>. Read more

Similar to send_data, but only works with Vec<u8>. The PamData trait doesn’t have to be implemented on the data, a callback can be passed as an argument instead. Read more

Retrieve bytes previously stored with send_bytes. The result is a clone of the data. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.