comparison libpam-sys/src/constants.rs @ 112:82995b4dccee

Finish renaming "illumos" to "sun".
author Paul Fisher <paul@pfish.zone>
date Sun, 29 Jun 2025 02:21:26 -0400
parents 2346fd501b7a
children 178310336596
comparison
equal deleted inserted replaced
111:04105e9a7de8 112:82995b4dccee
122 PAM_RADIO_TYPE = 5; 122 PAM_RADIO_TYPE = 5;
123 PAM_BINARY_PROMPT = 7; 123 PAM_BINARY_PROMPT = 7;
124 ); 124 );
125 } 125 }
126 126
127 #[cfg_pam_impl(any("Illumos", "OpenPam", "OpenPamMinimal"))] 127 #[cfg_pam_impl(any("OpenPam", "OpenPamMinimal", "Sun"))]
128 pub use illumos_openpam; 128 pub use openpam_sun::*;
129 #[cfg_pam_impl(any("Illumos", "OpenPam", "OpenPamMinimal"))] 129 #[cfg_pam_impl(any("OpenPam", "OpenPamMinimal", "Sun"))]
130 mod illumos_openpam { 130 mod openpam_sun {
131 define!( 131 define!(
132 /// An error code. 132 /// An error code.
133 PAM_OPEN_ERR = 1; 133 PAM_OPEN_ERR = 1;
134 PAM_SYMBOL_ERR = 2; 134 PAM_SYMBOL_ERR = 2;
135 PAM_SERVICE_ERR = 3; 135 PAM_SERVICE_ERR = 3;
185 PAM_UPDATE_AUTHTOK = 0b0010; 185 PAM_UPDATE_AUTHTOK = 0b0010;
186 PAM_CHANGE_EXPIRED_AUTHTOK = 0b0100; 186 PAM_CHANGE_EXPIRED_AUTHTOK = 0b0100;
187 ); 187 );
188 } 188 }
189 189
190 #[cfg_pam_impl("OpenPam")]
191 pub use openpam::*;
192 #[cfg_pam_impl("OpenPam")]
193 mod openpam {
194 define!(
195 /// An error code.
196 PAM_MODULE_UNKNOWN = 28;
197 PAM_DOMAIN_UNKNOWN = 29;
198 PAM_BAD_HANDLE = 30;
199 PAM_BAD_ITEM = 31;
200 PAM_BAD_FEATURE = 32;
201 PAM_BAD_CONSTANT = 33;
202 );
203 /// The total number of PAM error codes.
204 pub const PAM_NUM_ERRORS: i32 = 34;
205
206 define!(
207 /// An item type.
208 PAM_AUTHTOK_PROMPT = 11;
209 PAM_OLDAUTHTOK_PROMPT = 12;
210 PAM_HOST = 13;
211 );
212 /// The total number of PAM items.
213 pub const PAM_NUM_ITEMS: u32 = 14;
214 }
215
190 /// Constants exclusive to Illumos. 216 /// Constants exclusive to Illumos.
191 #[cfg_pam_impl("Sun")] 217 #[cfg_pam_impl("Sun")]
192 pub use sun::*; 218 pub use sun::*;
193 #[cfg_pam_impl("Sun")] 219 #[cfg_pam_impl("Sun")]
194 mod sun { 220 mod sun {
203 229
204 /// A flag for `pam_chauthtok`. 230 /// A flag for `pam_chauthtok`.
205 pub const PAM_NO_AUTHTOK_CHECK: u32 = 0b1000; 231 pub const PAM_NO_AUTHTOK_CHECK: u32 = 0b1000;
206 } 232 }
207 233
208 #[cfg_pam_impl("OpenPam")]
209 pub use openpam::*;
210 #[cfg_pam_impl("OpenPam")]
211 mod openpam {
212 define!(
213 /// An error code.
214 PAM_MODULE_UNKNOWN = 28;
215 PAM_DOMAIN_UNKNOWN = 29;
216 PAM_BAD_HANDLE = 30;
217 PAM_BAD_ITEM = 31;
218 PAM_BAD_FEATURE = 32;
219 PAM_BAD_CONSTANT = 33;
220 );
221 /// The total number of PAM error codes.
222 pub const PAM_NUM_ERRORS: i32 = 34;
223
224 define!(
225 /// An item type.
226 PAM_AUTHTOK_PROMPT = 11;
227 PAM_OLDAUTHTOK_PROMPT = 12;
228 PAM_HOST = 13;
229 );
230 /// The total number of PAM items.
231 pub const PAM_NUM_ITEMS: u32 = 14;
232 }
233