Mercurial > crates > nonstick
comparison libpam-sys/libpam-sys-consts/src/constants.rs @ 170:f052e2417195
Completely avoid using libpam_sys if we're not actually linking.
| author | Paul Fisher <paul@pfish.zone> |
|---|---|
| date | Wed, 16 Jul 2025 18:45:20 -0400 |
| parents | 4b3a5095f68c |
| children |
comparison
equal
deleted
inserted
replaced
| 169:77470e45e397 | 170:f052e2417195 |
|---|---|
| 67 /// Maximum size of PAM conversation elements (suggested). | 67 /// Maximum size of PAM conversation elements (suggested). |
| 68 PAM_MAX_NUM_MSG = 32; | 68 PAM_MAX_NUM_MSG = 32; |
| 69 PAM_MAX_MSG_SIZE = 512; | 69 PAM_MAX_MSG_SIZE = 512; |
| 70 PAM_MAX_RESP_SIZE = 512; | 70 PAM_MAX_RESP_SIZE = 512; |
| 71 ); | 71 ); |
| 72 | |
| 73 /// A flag for `pam_authenticate`. | |
| 74 pub const PAM_DISALLOW_NULL_AUTHTOK: i32 = 0x1; | |
| 72 | 75 |
| 73 #[cfg(pam_impl = "LinuxPam")] | 76 #[cfg(pam_impl = "LinuxPam")] |
| 74 pub use linux_pam::*; | 77 pub use linux_pam::*; |
| 75 #[cfg(pam_impl = "LinuxPam")] | 78 #[cfg(pam_impl = "LinuxPam")] |
| 76 mod linux_pam { | 79 mod linux_pam { |
| 111 ); | 114 ); |
| 112 | 115 |
| 113 define!( | 116 define!( |
| 114 /// A flag value. | 117 /// A flag value. |
| 115 PAM_SILENT = 0x8000; | 118 PAM_SILENT = 0x8000; |
| 116 PAM_DISALLOW_NULL_AUTHTOK = 0x0001; | |
| 117 PAM_ESTABLISH_CRED = 0x0002; | 119 PAM_ESTABLISH_CRED = 0x0002; |
| 118 PAM_DELETE_CRED = 0x0004; | 120 PAM_DELETE_CRED = 0x0004; |
| 119 PAM_REINITIALIZE_CRED = 0x0008; | 121 PAM_REINITIALIZE_CRED = 0x0008; |
| 120 PAM_REFRESH_CRED = 0x0010; | 122 PAM_REFRESH_CRED = 0x0010; |
| 121 | 123 |
| 211 // Sun doesn't use them so we're omitting them here. | 213 // Sun doesn't use them so we're omitting them here. |
| 212 | 214 |
| 213 /// A general flag for PAM operations. | 215 /// A general flag for PAM operations. |
| 214 pub const PAM_SILENT: i32 = 0x80000000u32 as i32; | 216 pub const PAM_SILENT: i32 = 0x80000000u32 as i32; |
| 215 | 217 |
| 216 /// A flag for `pam_authenticate`. | |
| 217 pub const PAM_DISALLOW_NULL_AUTHTOK: i32 = 0b1; | |
| 218 | |
| 219 define!( | 218 define!( |
| 220 /// A flag for `pam_setcred`. | 219 /// A flag for `pam_setcred`. |
| 221 PAM_ESTABLISH_CRED = 0b0001; | 220 PAM_ESTABLISH_CRED = 0b0001; |
| 222 PAM_DELETE_CRED = 0b0010; | 221 PAM_DELETE_CRED = 0b0010; |
| 223 PAM_REINITIALIZE_CRED = 0b0100; | 222 PAM_REINITIALIZE_CRED = 0b0100; |
