Mercurial > crates > nonstick
comparison libpam-sys/src/structs.rs @ 119:476a22db8639
Add PtrPtrVec to make it easy to pass pointer-to-pointers to PAM.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Mon, 30 Jun 2025 01:40:28 -0400 |
parents | 39760dfc9b3b |
children |
comparison
equal
deleted
inserted
replaced
118:39760dfc9b3b | 119:476a22db8639 |
---|---|
42 /// | 42 /// |
43 /// For important details about the format of `messages`, | 43 /// For important details about the format of `messages`, |
44 /// see the [`helpers`](crate::helpers) module. | 44 /// see the [`helpers`](crate::helpers) module. |
45 pub type ConversationCallback = unsafe extern "C" fn( | 45 pub type ConversationCallback = unsafe extern "C" fn( |
46 num_msg: c_int, | 46 num_msg: c_int, |
47 // This is a *const *const because accessing memory from a reference | |
48 // outside its bounds is undefined behavior, and *messages is an array | |
49 // in X/SSO PAM impls. | |
47 messages: *const *const Message, | 50 messages: *const *const Message, |
51 // This is a &mut *mut because the caller sets the pointer in `responses` | |
52 // but does not mess around outside its memory space. | |
48 responses: &mut *mut Response, | 53 responses: &mut *mut Response, |
49 appdata: *const AppData, | 54 appdata: *const AppData, |
50 ) -> c_int; | 55 ) -> c_int; |
51 | 56 |
52 /// Used by PAM to communicate between the module and the application. | 57 /// Used by PAM to communicate between the module and the application. |