Mercurial > crates > nonstick
comparison libpam-sys/src/lib.rs @ 153:3036f2e6a022 default tip
Add module-specific data support.
This adds support for a safe form of `pam_get_data` and `pam_set_data`,
where data is (as best as humanly possible) type-safe and restricted
to only the module where it was created.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 08 Jul 2025 00:31:54 -0400 |
parents | 4b3a5095f68c |
children |
comparison
equal
deleted
inserted
replaced
152:4d11b2e7da83 | 153:3036f2e6a022 |
---|---|
137 /// Ends the PAM transaction. | 137 /// Ends the PAM transaction. |
138 pub fn pam_end(pamh: *mut pam_handle, flags: c_int) -> c_int; | 138 pub fn pam_end(pamh: *mut pam_handle, flags: c_int) -> c_int; |
139 | 139 |
140 /// Gets module-specific data. PAM still owns the data. | 140 /// Gets module-specific data. PAM still owns the data. |
141 pub fn pam_get_data( | 141 pub fn pam_get_data( |
142 pamh: *mut pam_handle, | 142 pamh: *const pam_handle, |
143 module_data_name: *const c_char, | 143 module_data_name: *const c_char, |
144 data: *mut *const c_void, | 144 data: *mut *const c_void, |
145 ) -> c_int; | 145 ) -> c_int; |
146 | 146 |
147 /// Gets an environment variable. You own the return value. | 147 /// Gets an environment variable. You own the return value. |