diff src/libpam/handle.rs @ 175:e30775c80b49

Separate #[cfg(feature = "link")] from other features.
author Paul Fisher <paul@pfish.zone>
date Wed, 30 Jul 2025 14:57:12 -0400
parents 9e4ce1631bd3
children 0730f5f2ee2a
line wrap: on
line diff
--- a/src/libpam/handle.rs	Tue Jul 29 18:58:27 2025 -0400
+++ b/src/libpam/handle.rs	Wed Jul 30 14:57:12 2025 -0400
@@ -504,6 +504,12 @@
         unsafe { items::get_cstr_item(self, item_type) }?.ok_or(ErrorCode::ConversationError)
     }
 
+    #[cfg(not(any(pam_impl = "LinuxPam", pam_impl = "OpenPam", pam_impl = "Sun")))]
+    fn get_authtok(&mut self, _: Option<&OsStr>, _: ItemType) -> Result<OsString> {
+        // We don't have an authtok implementation for other PAM implementations.
+        Err(ErrorCode::ConversationError)
+    }
+
     /// Gets the `PAM_CONV` item from the handle.
     fn conversation_item(&self) -> Result<&PamConv> {
         let mut output: *const c_void = ptr::null();