Mercurial > crates > nonstick
comparison src/libpam/handle.rs @ 105:13b4d2a19674
Support Rust v1.75.0.
This is the version included in Ubuntu 24.04 LTS and Debian Trixie,
so it's old enough to have wide penetration without being too old
to get new features (Debian Stable, I love you but v1.63 is just
not going to work out).
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Thu, 26 Jun 2025 00:48:51 -0400 |
parents | dfcd96a74ac4 |
children |
comparison
equal
deleted
inserted
replaced
104:a2676475e86b | 105:13b4d2a19674 |
---|---|
197 }; | 197 }; |
198 #[cfg(pam_impl = "linux-pam")] | 198 #[cfg(pam_impl = "linux-pam")] |
199 { | 199 { |
200 // SAFETY: We're calling this function with a known value. | 200 // SAFETY: We're calling this function with a known value. |
201 unsafe { | 201 unsafe { |
202 pam_ffi::pam_syslog(self, level as c_int, c"%s".as_ptr().cast(), entry.as_ptr()) | 202 pam_ffi::pam_syslog(self, level as c_int, "%s\0".as_ptr().cast(), entry.as_ptr()) |
203 } | 203 } |
204 } | 204 } |
205 #[cfg(pam_impl = "openpam")] | 205 #[cfg(pam_impl = "openpam")] |
206 { | 206 { |
207 // SAFETY: We're calling this function with a known value. | 207 // SAFETY: We're calling this function with a known value. |
208 unsafe { | 208 unsafe { |
209 pam_ffi::openpam_log(self, level as c_int, c"%s".as_ptr().cast(), entry.as_ptr()) | 209 pam_ffi::openpam_log(self, level as c_int, "%s\0".as_ptr().cast(), entry.as_ptr()) |
210 } | 210 } |
211 } | 211 } |
212 } | 212 } |
213 | 213 |
214 fn username(&mut self, prompt: Option<&str>) -> Result<String> { | 214 fn username(&mut self, prompt: Option<&str>) -> Result<String> { |