comparison libpam-sys/src/lib.rs @ 163:a75a66cb4181

Add end-to-end tests; fix issues found by tests. - Create tests and installer/remover shell script - Fix Pointer/pointee problems - Add Debug formatting - Misc cleanup
author Paul Fisher <paul@pfish.zone>
date Mon, 14 Jul 2025 17:40:11 -0400
parents d5b7b28d754e
children 9e4ce1631bd3
comparison
equal deleted inserted replaced
162:180237d0b498 163:a75a66cb4181
42 } 42 }
43 } 43 }
44 44
45 /// Used by PAM to communicate between the module and the application. 45 /// Used by PAM to communicate between the module and the application.
46 #[repr(C)] 46 #[repr(C)]
47 #[derive(Debug)]
47 pub struct pam_conv { 48 pub struct pam_conv {
48 pub conv: unsafe extern "C" fn( 49 pub conv: unsafe extern "C" fn(
49 num_msg: c_int, 50 num_msg: c_int,
50 msg: *const *const pam_message, 51 msg: *const *const pam_message,
51 resp: *mut *mut pam_response, 52 resp: *mut *mut pam_response,
54 pub appdata_ptr: *mut c_void, 55 pub appdata_ptr: *mut c_void,
55 } 56 }
56 57
57 /// A message sent into a PAM conversation. 58 /// A message sent into a PAM conversation.
58 #[repr(C)] 59 #[repr(C)]
60 #[derive(Debug)]
59 pub struct pam_message { 61 pub struct pam_message {
60 pub msg_style: c_int, 62 pub msg_style: c_int,
61 pub msg: *const c_char, 63 pub msg: *const c_char,
62 } 64 }
63 65
64 /// A response returned from a PAM conversation. 66 /// A response returned from a PAM conversation.
65 #[repr(C)] 67 #[repr(C)]
68 #[derive(Debug)]
66 pub struct pam_response { 69 pub struct pam_response {
67 pub resp: *mut c_char, 70 pub resp: *mut c_char,
68 /// Completely unused. 71 /// Completely unused.
69 pub resp_retcode: c_int, 72 pub resp_retcode: c_int,
70 } 73 }