LibPamTransaction

Struct LibPamTransaction 

Source
pub struct LibPamTransaction<C: Conversation> { /* private fields */ }
Expand description

An owned PAM handle.

Implementations§

Source§

impl<C: Conversation> LibPamTransaction<C>

Source

pub fn end_silent(self)

Ends the PAM transaction “quietly” (on Linux-PAM only).

On Linux-PAM, this is equivalent to passing the PAM_DATA_SILENT flag to pam_end on Linux-PAM, which signals that data cleanup should “not treat the call too seriously” [sic].

On other platforms, this is no different than letting the transaction end on its own.

Trait Implementations§

Source§

impl<C: Conversation> Debug for LibPamTransaction<C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C: Conversation> Drop for LibPamTransaction<C>

Source§

fn drop(&mut self)

Closes the PAM session on an owned PAM handle.

This internally calls pam_end with the appropriate error code.

§References
Source§

impl<C: Conversation> Logger for LibPamTransaction<C>

Source§

fn log(&self, level: Level, location: Location<'_>, entry: Arguments<'_>)

Logs something via this PAM handle. Read more
Source§

impl<C: Conversation> PamShared for LibPamTransaction<C>

Source§

fn environ(&self) -> impl EnvironMap<'_>

The contents of the environment to set for the logged-in user. Read more
Source§

fn environ_mut(&mut self) -> impl EnvironMapMut<'_>

A writable map of the environment to set for the logged-in user. Read more
Source§

fn username(&mut self, prompt: Option<&OsStr>) -> Result<OsString>

Retrieves the name of the user who is authenticating or logging in. Read more
Source§

fn items(&self) -> impl Items<'_>

Gets Items, data shared by PAM, the application, and modules. Read more
Source§

fn items_mut(&mut self) -> impl ItemsMut<'_>

Read-write access to PAM Items. Read more
Source§

impl<C: Conversation> Transaction for LibPamTransaction<C>

Source§

fn authenticate(&mut self, flags: AuthnFlags) -> Result<()>

Starts the authentication process for the user. Read more
Source§

fn account_management(&mut self, flags: AuthnFlags) -> Result<()>

Verifies the validity of the user’s account (and other stuff). Read more
Source§

fn change_authtok(&mut self, flags: AuthtokFlags) -> Result<()>

Changes the authentication token. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.