Mercurial > crates > nonstick
comparison libpam-sys/src/lib.rs @ 137:88627c057709 default tip
Add Sun PAM functions from Illumos headers.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Thu, 03 Jul 2025 17:33:13 -0400 |
parents | efbc235f01d3 |
children |
comparison
equal
deleted
inserted
replaced
136:efbc235f01d3 | 137:88627c057709 |
---|---|
168 pub path: *mut c_char, | 168 pub path: *mut c_char, |
169 pub func: [pam_func_t; 6], | 169 pub func: [pam_func_t; 6], |
170 pub dlh: *mut c_void, | 170 pub dlh: *mut c_void, |
171 } | 171 } |
172 | 172 |
173 #[cfg(pam_impl = "OpenPam")] | 173 #[cfg(any(pam_impl = "OpenPam", pam_impl = "Sun"))] |
174 #[derive(Debug)] | 174 #[derive(Debug)] |
175 #[repr(C)] | 175 #[repr(C)] |
176 pub struct pam_repository { | 176 pub struct pam_repository { |
177 pub typ: *mut c_char, | 177 pub type_: *mut c_char, |
178 pub scope: *mut c_void, | 178 pub scope: *mut c_void, |
179 pub scope_len: usize, | 179 pub scope_len: usize, |
180 } | 180 } |
181 | 181 |
182 // These are the functions specified in X/SSO. Everybody exports them. | 182 // These are the functions specified in X/SSO. Everybody exports them. |
374 | 374 |
375 pub fn pam_modutil_write(fd: c_int, buffer: *const c_char, count: c_int) -> c_int; | 375 pub fn pam_modutil_write(fd: c_int, buffer: *const c_char, count: c_int) -> c_int; |
376 | 376 |
377 pub fn pam_modutil_audit_write( | 377 pub fn pam_modutil_audit_write( |
378 pamh: *mut pam_handle, | 378 pamh: *mut pam_handle, |
379 typ: c_int, | 379 type_: c_int, |
380 message: *const c_char, | 380 message: *const c_char, |
381 retval: c_int, | 381 retval: c_int, |
382 ) -> c_int; | 382 ) -> c_int; |
383 | 383 |
384 pub fn pam_modutil_drop_priv( | 384 pub fn pam_modutil_drop_priv( |
511 _msg: *const *const pam_message, | 511 _msg: *const *const pam_message, |
512 _resp: *mut *mut pam_response, | 512 _resp: *mut *mut pam_response, |
513 _data: *mut AppData, | 513 _data: *mut AppData, |
514 ) -> c_int; | 514 ) -> c_int; |
515 } | 515 } |
516 | |
517 #[cfg(pam_impl = "Sun")] | |
518 extern "C" { | |
519 pub fn __pam_get_authtok( | |
520 pamh: *mut pam_handle, | |
521 source: c_int, | |
522 type_: c_int, | |
523 prompt: *const c_char, | |
524 authtok: *mut *mut c_char, | |
525 ) -> c_int; | |
526 | |
527 pub fn __pam_log(priority: c_int, format: *const c_char, ...); | |
528 } |