Mercurial > crates > nonstick
comparison pam/src/conv.rs @ 27:0ceeffe67ec4
style: rustfmt
| author | holycleugh <holycleugh> |
|---|---|
| date | Sun, 30 Dec 2018 03:38:57 -0500 |
| parents | 27730595f1ea |
| children | 81a9f0479e50 |
comparison
equal
deleted
inserted
replaced
| 26:31618a75f251 | 27:0ceeffe67ec4 |
|---|---|
| 1 use libc::{c_char, c_int}; | 1 use libc::{c_char, c_int}; |
| 2 use std::ffi::{CStr, CString}; | |
| 2 use std::ptr; | 3 use std::ptr; |
| 3 use std::ffi::{CStr, CString}; | |
| 4 | 4 |
| 5 use constants::PamResultCode; | 5 use constants::PamResultCode; |
| 6 use constants::*; | 6 use constants::*; |
| 7 use module::{PamItem, PamResult}; | 7 use module::{PamItem, PamResult}; |
| 8 | 8 |
| 26 /// Communication is mediated by the pam client (the application that invoked | 26 /// Communication is mediated by the pam client (the application that invoked |
| 27 /// pam). Messages sent will be relayed to the user by the client, and response | 27 /// pam). Messages sent will be relayed to the user by the client, and response |
| 28 /// will be relayed back. | 28 /// will be relayed back. |
| 29 #[repr(C)] | 29 #[repr(C)] |
| 30 pub struct PamConv { | 30 pub struct PamConv { |
| 31 conv: extern "C" fn(num_msg: c_int, | 31 conv: extern "C" fn( |
| 32 pam_message: &&PamMessage, | 32 num_msg: c_int, |
| 33 pam_response: &mut *const PamResponse, | 33 pam_message: &&PamMessage, |
| 34 appdata_ptr: *const AppDataPtr) | 34 pam_response: &mut *const PamResponse, |
| 35 -> PamResultCode, | 35 appdata_ptr: *const AppDataPtr, |
| 36 appdata_ptr: *const AppDataPtr, | 36 ) -> PamResultCode, |
| 37 ppdata_ptr: *const AppDataPtr, | |
| 37 } | 38 } |
| 38 | 39 |
| 39 impl PamConv { | 40 impl PamConv { |
| 40 /// Sends a message to the pam client. | 41 /// Sends a message to the pam client. |
| 41 /// | 42 /// |
