Mercurial > crates > nonstick
comparison src/libpam/handle.rs @ 156:66e662cde087 default tip
fix return type of get_authtok for weird PAMs
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 08 Jul 2025 01:04:30 -0400 |
parents | ab8020566cd9 |
children |
comparison
equal
deleted
inserted
replaced
155:ab8020566cd9 | 156:66e662cde087 |
---|---|
497 // SAFETY: We got this string from PAM. | 497 // SAFETY: We got this string from PAM. |
498 unsafe { memory::copy_pam_string(output) }.ok_or(ErrorCode::ConversationError) | 498 unsafe { memory::copy_pam_string(output) }.ok_or(ErrorCode::ConversationError) |
499 } | 499 } |
500 | 500 |
501 #[cfg(not(any(pam_impl = "LinuxPam", pam_impl = "OpenPam")))] | 501 #[cfg(not(any(pam_impl = "LinuxPam", pam_impl = "OpenPam")))] |
502 fn get_authtok(&mut self, prompt: Option<&str>, item_type: ItemType) -> Result<String> { | 502 fn get_authtok(&mut self, prompt: Option<&OsStr>, item_type: ItemType) -> Result<OsString> { |
503 Err(ErrorCode::ConversationError) | 503 Err(ErrorCode::ConversationError) |
504 } | 504 } |
505 | 505 |
506 /// Gets the `PAM_CONV` item from the handle. | 506 /// Gets the `PAM_CONV` item from the handle. |
507 fn conversation_item(&self) -> Result<&PamConv> { | 507 fn conversation_item(&self) -> Result<&PamConv> { |