diff src/macros.rs @ 59:3f4a77aa88be

Fix string copyting and improve error situation. This change is too big and includes several things: - Fix copying strings from PAM by fixing const and mut on pam funcs. - Improve error enums by simplifying conversions and removing unnecessary and ambiguous "success" variants. - Make a bunch of casts nicer. - Assorted other cleanup.
author Paul Fisher <paul@pfish.zone>
date Wed, 21 May 2025 00:27:18 -0400
parents daa2cde64601
children
line wrap: on
line diff
--- a/src/macros.rs	Mon May 05 00:16:04 2025 -0400
+++ b/src/macros.rs	Wed May 21 00:27:18 2025 -0400
@@ -36,7 +36,7 @@
         mod pam_hooks_scope {
             use std::ffi::CStr;
             use std::os::raw::{c_char, c_int};
-            use $crate::constants::{Flags, ErrorCode};
+            use $crate::constants::{ErrorCode, Flags};
             use $crate::module::{PamHandle, PamHooks};
 
             fn extract_argv<'a>(argc: c_int, argv: *const *const c_char) -> Vec<&'a CStr> {