diff pam/src/conv.rs @ 44:50371046c61a default tip

Add support for pam_get_authtok and minor cleanups. This change adds the pam_get_authtok function for PAM modules, as well as performing a few cleanups: - Pattern match in a few more places. - Pull out string-copying into a function. - Format and run clippy. - Replace outdated PAM doc links with man7.org pages.
author Paul Fisher <paul@pfish.zone>
date Sat, 08 Mar 2025 19:29:46 -0500
parents ec70822cbdef
children
line wrap: on
line diff
--- a/pam/src/conv.rs	Mon Aug 29 14:32:28 2022 -0700
+++ b/pam/src/conv.rs	Sat Mar 08 19:29:46 2025 -0500
@@ -2,8 +2,8 @@
 use std::ffi::{CStr, CString};
 use std::ptr;
 
+use constants::PamMessageStyle;
 use constants::PamResultCode;
-use constants::PamMessageStyle;
 use items::Item;
 use module::PamResult;
 
@@ -37,7 +37,7 @@
 
 pub struct Conv<'a>(&'a Inner);
 
-impl<'a> Conv<'a> {
+impl Conv<'_> {
     /// Sends a message to the pam client.
     ///
     /// This will typically result in the user seeing a message or a prompt.
@@ -77,7 +77,7 @@
     }
 }
 
-impl<'a> Item for Conv<'a> {
+impl Item for Conv<'_> {
     type Raw = Inner;
 
     fn type_id() -> crate::items::ItemType {