Mercurial > crates > nonstick
comparison libpam-sys/src/lib.rs @ 158:d5b7b28d754e
Add `__TARGET_DEFAULT__` PamImpl and set up for docsrs build.
Also fixes some formatting stuff.
| author | Paul Fisher <paul@pfish.zone> |
|---|---|
| date | Sat, 12 Jul 2025 17:17:37 -0400 |
| parents | f71bfffb6de1 |
| children | a75a66cb4181 |
comparison
equal
deleted
inserted
replaced
| 157:0099f2f79f86 | 158:d5b7b28d754e |
|---|---|
| 116 pub scope: *mut c_void, | 116 pub scope: *mut c_void, |
| 117 pub scope_len: usize, | 117 pub scope_len: usize, |
| 118 } | 118 } |
| 119 | 119 |
| 120 // These are the functions specified in X/SSO. Everybody exports them. | 120 // These are the functions specified in X/SSO. Everybody exports them. |
| 121 #[link(name = "pam")] | |
| 122 extern "C" { | 121 extern "C" { |
| 123 /// Account validation. | 122 /// Account validation. |
| 124 pub fn pam_acct_mgmt(pamh: *mut pam_handle, flags: c_int) -> c_int; | 123 pub fn pam_acct_mgmt(pamh: *mut pam_handle, flags: c_int) -> c_int; |
| 125 | 124 |
| 126 /// Authenticate a user. | 125 /// Authenticate a user. |
| 197 // Nobody implements pam_set_mapped_username. | 196 // Nobody implements pam_set_mapped_username. |
| 198 | 197 |
| 199 // The pam_sm_whatever functions are prototypes for the functions that | 198 // The pam_sm_whatever functions are prototypes for the functions that |
| 200 // a PAM module should implement, not symbols provided by PAM. | 199 // a PAM module should implement, not symbols provided by PAM. |
| 201 | 200 |
| 202 // Nobody implements pam_authenticate_secondary. | |
| 203 | |
| 204 /// Starts a PAM transaction. The `conv` may or may not be copied. | 201 /// Starts a PAM transaction. The `conv` may or may not be copied. |
| 205 pub fn pam_start( | 202 pub fn pam_start( |
| 206 service: *const c_char, | 203 service: *const c_char, |
| 207 user: *const c_char, | 204 user: *const c_char, |
| 208 pam_conv: *mut pam_conv, | 205 pam_conv: *mut pam_conv, |
| 286 pub fn pam_modutil_user_in_group_nam_nam( | 283 pub fn pam_modutil_user_in_group_nam_nam( |
| 287 pamh: *mut pam_handle, | 284 pamh: *mut pam_handle, |
| 288 user: *const c_char, | 285 user: *const c_char, |
| 289 group: *const c_char, | 286 group: *const c_char, |
| 290 ) -> c_int; | 287 ) -> c_int; |
| 288 | |
| 291 pub fn pam_modutil_user_in_group_nam_gid( | 289 pub fn pam_modutil_user_in_group_nam_gid( |
| 292 pamh: *mut pam_handle, | 290 pamh: *mut pam_handle, |
| 293 user: *const c_char, | 291 user: *const c_char, |
| 294 group: libc::gid_t, | 292 group: libc::gid_t, |
| 295 ) -> c_int; | 293 ) -> c_int; |
